fix comment

pull/3405/head
Rongjian Lan 4 years ago
parent 46bf183d1f
commit 56d4bc2b1b
  1. 3
      api/service/syncing/syncing.go
  2. 3
      consensus/consensus_v2.go

@ -29,14 +29,11 @@ import (
// Constants for syncing.
const (
downloadBlocksRetryLimit = 5 // downloadBlocks service retry limit
TimesToFail = 5 // downloadBlocks service retry limit
RegistrationNumber = 3
SyncingPortDifference = 3000
inSyncThreshold = 0 // when peerBlockHeight - myBlockHeight <= inSyncThreshold, it's ready to join consensus
syncStatusCheckCount = 3 // check this many times before confirming it's out of sync
SyncLoopBatchSize uint32 = 1000 // maximum size for one query of block hashes
verifyHeaderBatchSize uint64 = 100 // block chain header verification batch size
SyncLoopFrequency = 1 // unit in second
LastMileBlocksSize = 50
// after cutting off a number of connected peers, the result number of peers

@ -158,6 +158,9 @@ func (consensus *Consensus) finalCommit() {
}
// if leader successfully finalizes the block, send committed message to validators
// Note: leader already sent 67% commit in preCommit. The 100% commit won't be sent immediately
// to save network traffic. It will only be sent in retry if consensus doesn't move forward.
// Or if the leader is changed for next block, the 100% committed sig will be sent to the next leader immediately.
sendImmediately := false
if !consensus.IsLeader() || block.IsLastBlockInEpoch() {
sendImmediately = true

Loading…
Cancel
Save