fix some bugs and address some comments

This commit is contained in:
Shrenuj Bansal
2022-10-16 22:52:22 -04:00
parent 17a77220c2
commit 139f8773de
8 changed files with 33 additions and 59 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ package full
import (
"context"
"os"
"sync/atomic"
"github.com/ipfs/go-cid"
@@ -56,7 +57,7 @@ func (a *SyncAPI) SyncSubmitBlock(ctx context.Context, blk *types.BlockMsg) erro
return xerrors.Errorf("loading parent block: %w", err)
}
if a.SlashFilter != nil {
if a.SlashFilter != nil && os.Getenv("LOTUS_NO_SLASHFILTER") != "_yes_i_know_i_can_and_probably_will_lose_all_my_fil_and_power_" {
if err := a.SlashFilter.MinedBlock(ctx, blk.Header, parent.Height); err != nil {
log.Errorf("<!!> SLASH FILTER ERROR: %s", err)
return xerrors.Errorf("<!!> SLASH FILTER ERROR: %w", err)