Merge pull request #11063 from storswiftlabs/slasher
feat: daemon: improvemens to the consensus slasher
This commit is contained in:
commit
5aeb27ed94
@ -14,6 +14,7 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/DataDog/zstd"
|
"github.com/DataDog/zstd"
|
||||||
levelds "github.com/ipfs/go-ds-leveldb"
|
levelds "github.com/ipfs/go-ds-leveldb"
|
||||||
@ -679,6 +680,13 @@ func slashConsensus(a lapi.FullNode, p string, from string) error {
|
|||||||
log.Errorf("could not serialize declare faults parameters: %s", err)
|
log.Errorf("could not serialize declare faults parameters: %s", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
for {
|
||||||
|
head, err := a.ChainHead(ctx)
|
||||||
|
if err != nil || head.Height() > block.Height {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
time.Sleep(time.Second * 10)
|
||||||
|
}
|
||||||
message, err := a.MpoolPushMessage(ctx, &types.Message{
|
message, err := a.MpoolPushMessage(ctx, &types.Message{
|
||||||
To: block.Miner,
|
To: block.Miner,
|
||||||
From: fromAddr,
|
From: fromAddr,
|
||||||
|
Loading…
Reference in New Issue
Block a user