mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-26 16:36:17 +00:00
adjust timeout for m1
This commit is contained in:
parent
e88e412f84
commit
a8c2a15886
1 changed files with 5 additions and 5 deletions
|
|
@ -51,8 +51,8 @@ const (
|
|||
chainHeadChanSize = 10
|
||||
// chainSideChanSize is the size of channel listening to ChainSideEvent.
|
||||
chainSideChanSize = 10
|
||||
// Timeout waiting for M1
|
||||
m1Timeout = 10
|
||||
// timeout waiting for M1
|
||||
waitPeriod = 10
|
||||
)
|
||||
|
||||
// Agent can register themself with the worker
|
||||
|
|
@ -476,7 +476,7 @@ func (self *worker) commitNewWork() {
|
|||
return
|
||||
}
|
||||
h := hop(len(masternodes), preIndex, curIndex)
|
||||
gap := int64(c.GetPeriod()) * int64(h)
|
||||
gap := waitPeriod * int64(h)
|
||||
log.Info("Distance from the parent block", "seconds", gap, "hops", h)
|
||||
L:
|
||||
select {
|
||||
|
|
@ -486,9 +486,9 @@ func (self *worker) commitNewWork() {
|
|||
self.chainHeadCh <- newBlock
|
||||
return
|
||||
}
|
||||
case <-time.After(time.Duration(gap+m1Timeout) * time.Second):
|
||||
case <-time.After(time.Duration(gap) * time.Second):
|
||||
// wait enough. It's my turn
|
||||
log.Info("Wait enough. It's my turn", "waited seconds", gap+m1Timeout)
|
||||
log.Info("Wait enough. It's my turn", "waited seconds", gap)
|
||||
break L
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue