mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-20 15:04:22 +00:00
update validate/complete logic for consensus params
This commit is contained in:
@@ -455,7 +455,7 @@ func updateState(
|
||||
if abciResponses.EndBlock.ConsensusParamUpdates != nil {
|
||||
// NOTE: must not mutate s.ConsensusParams
|
||||
nextParams = state.ConsensusParams.UpdateConsensusParams(abciResponses.EndBlock.ConsensusParamUpdates)
|
||||
err := nextParams.ValidateConsensusParams()
|
||||
err := nextParams.Validate()
|
||||
if err != nil {
|
||||
return state, fmt.Errorf("error updating consensus params: %w", err)
|
||||
}
|
||||
|
||||
@@ -239,7 +239,9 @@ func FromProto(pb *tmstate.State) (*State, error) {
|
||||
}
|
||||
|
||||
state.LastHeightValidatorsChanged = pb.LastHeightValidatorsChanged
|
||||
state.ConsensusParams = types.ConsensusParamsFromProto(pb.ConsensusParams)
|
||||
c := types.ConsensusParamsFromProto(pb.ConsensusParams)
|
||||
(&c).Complete()
|
||||
state.ConsensusParams = c
|
||||
state.LastHeightConsensusParamsChanged = pb.LastHeightConsensusParamsChanged
|
||||
state.LastResultsHash = pb.LastResultsHash
|
||||
state.AppHash = pb.AppHash
|
||||
|
||||
Reference in New Issue
Block a user