Browse Source

fixes from review

pull/584/head
Ethan Buchman 7 years ago
parent
commit
0bf66deb3c
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      config/config.go
  2. +1
    -1
      consensus/state.go

+ 1
- 1
config/config.go View File

@ -323,7 +323,7 @@ func (cfg *ConsensusConfig) WaitForTxs() bool {
}
// EmptyBlocks returns the amount of time to wait before proposing an empty block or starting the propose timer if there are no txs available
func (cfg *ConsensusConfig) EmptyBlocks() time.Duration {
func (cfg *ConsensusConfig) EmptyBlocksInterval() time.Duration {
return time.Duration(cfg.CreateEmptyBlocksInterval) * time.Second
}


+ 1
- 1
consensus/state.go View File

@ -795,7 +795,7 @@ func (cs *ConsensusState) enterNewRound(height int, round int) {
waitForTxs := cs.config.WaitForTxs() && round == 0 && !cs.needProofBlock(height)
if waitForTxs {
if cs.config.CreateEmptyBlocksInterval > 0 {
cs.scheduleTimeout(cs.config.EmptyBlocks(), height, round, RoundStepNewRound)
cs.scheduleTimeout(cs.config.EmptyBlocksInterval(), height, round, RoundStepNewRound)
}
go cs.proposalHeartbeat(height, round)
} else {


Loading…
Cancel
Save