mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
Fixed wait period longer in when near checkpoit block for all MNs.
This commit is contained in:
parent
abaa9703e6
commit
146e73a6e9
1 changed files with 2 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ const (
|
||||||
// timeout waiting for M1
|
// timeout waiting for M1
|
||||||
waitPeriod = 10
|
waitPeriod = 10
|
||||||
// timeout for checkpoint.
|
// timeout for checkpoint.
|
||||||
waitPeriodCheckpoint = 60
|
waitPeriodCheckpoint = 30
|
||||||
)
|
)
|
||||||
|
|
||||||
// Agent can register themself with the worker
|
// Agent can register themself with the worker
|
||||||
|
|
@ -501,7 +501,7 @@ func (self *worker) commitNewWork() {
|
||||||
// Check nearest checkpoint block in hop range.
|
// Check nearest checkpoint block in hop range.
|
||||||
nearest := self.config.XDPoA.Epoch - (parent.Header().Number.Uint64() % self.config.XDPoS.Epoch)
|
nearest := self.config.XDPoA.Epoch - (parent.Header().Number.Uint64() % self.config.XDPoS.Epoch)
|
||||||
if uint64(h) >= nearest {
|
if uint64(h) >= nearest {
|
||||||
gap += waitPeriodCheckpoint
|
gap = waitPeriodCheckpoint * int64(h)
|
||||||
}
|
}
|
||||||
log.Info("Distance from the parent block", "seconds", gap, "hops", h)
|
log.Info("Distance from the parent block", "seconds", gap, "hops", h)
|
||||||
L:
|
L:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue