mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-29 11:15:50 +00:00
Applied comments from PR and minor cleanup
This commit is contained in:
@@ -238,7 +238,7 @@ func (pool *BlockPool) PopRequest() {
|
||||
// to smooth the block sync rate and the unit represents the number of blocks per second.
|
||||
// -1 because the start height is assumed to be 1 @jmalicevic ToDo, verify it is still OK when
|
||||
// starting height is not 1
|
||||
if (pool.height-pool.startHeight-1)%100 == 0 && pool.height != pool.startHeight {
|
||||
if (pool.height-pool.startHeight+1)%100 == 0 {
|
||||
newSyncRate := 100 / time.Since(pool.lastHundredBlockTimeStamp).Seconds()
|
||||
if pool.lastSyncRate == 0 {
|
||||
pool.lastSyncRate = newSyncRate
|
||||
|
||||
Reference in New Issue
Block a user