mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-28 18:55:42 +00:00
blocksync: code refactoring and bug fix
This commit is contained in:
@@ -547,7 +547,7 @@ func (r *Reactor) poolRoutine(ctx context.Context, stateSynced bool, blockSyncCh
|
||||
// TODO(sergio, jmalicevic): Should we also validate against the extended commit?
|
||||
if r.lastTrustedBlock == nil || r.lastTrustedBlock.block == nil {
|
||||
if r.initialState.LastBlockHeight != 0 {
|
||||
r.lastTrustedBlock = &TrustedBlockData{r.store.LoadBlock(r.initialState.LastBlockHeight), r.store.LoadBlockCommit(r.initialState.LastBlockHeight)}
|
||||
r.lastTrustedBlock = &TrustedBlockData{r.store.LoadBlock(r.initialState.LastBlockHeight), r.store.LoadSeenCommit()}
|
||||
if r.lastTrustedBlock == nil {
|
||||
panic("Failed to load last trusted block")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user