sealer: Pass correct args to SubAllowed in selectors

This commit is contained in:
Łukasz Magiera 2022-07-12 13:09:20 +02:00
parent 43db2fb8a4
commit 91e474e72e
4 changed files with 6 additions and 3 deletions

View File

@ -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
}

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {