Browse Source

Validate ConsensusParams returned from abci app

pull/972/head
Ethan Frey 7 years ago
committed by Ethan Buchman
parent
commit
56cada6a0c
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      state/state.go

+ 6
- 0
state/state.go View File

@ -253,6 +253,12 @@ func (s *State) SetBlockAndValidators(header *types.Header, blockPartsHeader typ
nextParams := applyChanges(s.Params,
abciResponses.EndBlock.ConsensusParamChanges)
err := nextParams.Validate()
if err != nil {
s.logger.Error("Error updating consensus params", "err", err)
// TODO: err or carry on?
nextParams = s.Params
}
s.setBlockAndValidators(header.Height,
header.NumTxs,


Loading…
Cancel
Save