Validate ConsensusParams returned from abci app

This commit is contained in:
Ethan Frey
2017-12-14 10:14:01 +01:00
committed by Ethan Buchman
parent a0b2d77bef
commit 56cada6a0c

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,