sealer: Pass correct args to SubAllowed in selectors
This commit is contained in:
parent
43db2fb8a4
commit
91e474e72e
@ -185,9 +185,12 @@ func (bm *BlockMiner) MineBlocksMustPost(ctx context.Context, blocktime time.Dur
|
||||
|
||||
var target abi.ChainEpoch
|
||||
reportSuccessFn := func(success bool, epoch abi.ChainEpoch, err error) {
|
||||
// if api shuts down before mining, we may get an error which we should probably just ignore
|
||||
// (fixing it will require rewriting most of the mining loop)
|
||||
if err != nil && !strings.Contains(err.Error(), "websocket connection closed") {
|
||||
require.NoError(bm.t, err)
|
||||
}
|
||||
|
||||
target = epoch
|
||||
wait <- success
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ func (s *allocSelector) Ok(ctx context.Context, task sealtasks.TaskType, spt abi
|
||||
|
||||
for _, info := range best {
|
||||
if _, ok := have[info.ID]; ok {
|
||||
requested = requested.SubAllowed(info.AllowTypes, info.AllowTypes)
|
||||
requested = requested.SubAllowed(info.AllowTypes, info.DenyTypes)
|
||||
|
||||
// got all paths
|
||||
if requested == storiface.FTNone {
|
||||
|
@ -66,7 +66,7 @@ func (s *existingSelector) Ok(ctx context.Context, task sealtasks.TaskType, spt
|
||||
return true, false, nil
|
||||
}
|
||||
|
||||
requested = requested.SubAllowed(info.AllowTypes, info.AllowTypes)
|
||||
requested = requested.SubAllowed(info.AllowTypes, info.DenyTypes)
|
||||
|
||||
// got all paths
|
||||
if requested == storiface.FTNone {
|
||||
|
@ -87,7 +87,7 @@ func (s *moveSelector) Ok(ctx context.Context, task sealtasks.TaskType, spt abi.
|
||||
pref = true
|
||||
}
|
||||
|
||||
requested = requested.SubAllowed(info.AllowTypes, info.AllowTypes)
|
||||
requested = requested.SubAllowed(info.AllowTypes, info.DenyTypes)
|
||||
|
||||
// got all paths
|
||||
if requested == storiface.FTNone {
|
||||
|
Loading…
Reference in New Issue
Block a user