mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-29 03:05:49 +00:00
consensus: update state from store before use in reactor (#8576)
Closes: #8575 This PR aims to fix the `LastCommitRound can only be negative for initial height 0` issue we see in the e2e tests by initializing the `state` object before starting the receive routines in the consensus reactor. This is somewhat inelegant, but it should fix the issue.
This commit is contained in:
@@ -216,6 +216,8 @@ func (r *Reactor) OnStart(ctx context.Context) error {
|
||||
if err := r.state.Start(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
} else if err := r.state.updateStateFromStore(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
go r.updateRoundStateRoutine(ctx)
|
||||
|
||||
Reference in New Issue
Block a user