Merge pull request #10928 from storswiftlabs/slashfilter

Implement a tooling for slasher
This commit is contained in:
Aayush Rajasekaran
2023-06-13 09:15:22 -05:00
committed by GitHub
5 changed files with 173 additions and 22 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ func (a *SyncAPI) SyncSubmitBlock(ctx context.Context, blk *types.BlockMsg) erro
}
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 {
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)
}