Skip to content

Commit

Permalink
resolve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
realuncle committed Sep 26, 2021
1 parent 48f38a8 commit 1fac05b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions consensus/parlia/parlia.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,8 +800,9 @@ func (p *Parlia) Delay(chain consensus.ChainReader, header *types.Header) *time.
}
delay := p.delayForRamanujanFork(snap, header)
// The blocking time should be no more than half of period
if delay > time.Duration(p.config.Period)*time.Second/2 {
delay = time.Duration(p.config.Period) * time.Second / 2
half := time.Duration(p.config.Period) * time.Second / 2
if delay > half {
delay = half
}
return &delay
}
Expand Down

0 comments on commit 1fac05b

Please sign in to comment.