Skip to content

Commit a448a10

Browse files
authored
chore: disable pre-emptive block building
1 parent d837817 commit a448a10

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

consensus/state.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,13 +1956,14 @@ func (cs *State) finalizeCommit(height int64) {
19561956
cs.propagator.SetProposer(proposer.PubKey)
19571957
}
19581958

1959+
// (TODO: enable after investigating the issues happening because of it)
19591960
// build the block pre-emptively if we're the proposer and the timeout commit is higher than 1 s.
1960-
tc := cs.state.TimeoutCommit
1961-
if tc > blockBuildingTime && cs.privValidatorPubKey != nil {
1962-
if address := cs.privValidatorPubKey.Address(); cs.Validators.HasAddress(address) && cs.isProposer(address) {
1963-
go cs.buildNextBlock()
1964-
}
1965-
}
1961+
// tc := cs.state.TimeoutCommit
1962+
// if tc > blockBuildingTime && cs.privValidatorPubKey != nil {
1963+
// if address := cs.privValidatorPubKey.Address(); cs.Validators.HasAddress(address) && cs.isProposer(address) {
1964+
// go cs.buildNextBlock()
1965+
// }
1966+
// }
19661967
// By here,
19671968
// * cs.Height has been increment to height+1
19681969
// * cs.Step is now cstypes.RoundStepNewHeight

0 commit comments

Comments
 (0)