filecoin-project / specs-actors

DEPRECATED Specification of builtin actors, in the form of executable code.
Other
86 stars 102 forks source link

Clarify market actor sector termination with expired deals #1417

Closed anorth closed 3 years ago

anorth commented 3 years ago

1411 described a possible problem with the market actor handling termination of sectors after deals expire. I determined it's not a problem, but clarified and cleaned up associated code and tests here. This shows that OnMinerSectorsTerminate does not abort if deals have expired. So this PR does not change actor behaviour.

The first commit here adds return values to some of the mock runtime's setter methods, so that a value (like an epoch) can be set and assigned to a local variable in one line: newValue = rt.SetEpoch(oldValue + delta).

Closes #1411.

codecov-commenter commented 3 years ago

Codecov Report

Merging #1417 (47ae52f) into master (c7cff61) will increase coverage by 0.0%. The diff coverage is 88.8%.

@@          Coverage Diff           @@
##           master   #1417   +/-   ##
======================================
  Coverage    69.8%   69.9%           
======================================
  Files          72      72           
  Lines        7792    7786    -6     
======================================
  Hits         5446    5446           
+ Misses       1451    1448    -3     
+ Partials      895     892    -3