From 56cada6a0ceabebb351b91549f4e783a72ac6277 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Thu, 14 Dec 2017 10:14:01 +0100 Subject: [PATCH] Validate ConsensusParams returned from abci app --- state/state.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/state/state.go b/state/state.go index 34383cb15..94ca05281 100644 --- a/state/state.go +++ b/state/state.go @@ -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,