mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-05 21:14:53 +00:00
remove TimeIotaMs from ABCI consensus params (#3403)
Also - init substructures to avoid panic in pb2tm.ConsensusParams Before: if csp.Block is nil and we later try to access/write to it, we'll panic. After: if csp.Block is nil and we later try to access/write to it, there'll be no panic.
This commit is contained in:
@@ -324,7 +324,12 @@ func (h *Handshaker) ReplayBlocks(
|
||||
}
|
||||
|
||||
if res.ConsensusParams != nil {
|
||||
state.ConsensusParams = types.PB2TM.ConsensusParams(res.ConsensusParams)
|
||||
// Preserve TimeIotaMs since it's not exposed to the application.
|
||||
timeIotaMs := state.ConsensusParams.Block.TimeIotaMs
|
||||
{
|
||||
state.ConsensusParams = types.PB2TM.ConsensusParams(res.ConsensusParams)
|
||||
}
|
||||
state.ConsensusParams.Block.TimeIotaMs = timeIotaMs
|
||||
}
|
||||
sm.SaveState(h.stateDB, state)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user