From 18e7f872ec0cd0f0aeeacc4f43a459665a198bc6 Mon Sep 17 00:00:00 2001 From: Johann Barbie Date: Mon, 16 Jul 2018 19:37:50 +0200 Subject: [PATCH] removed validators length sanity check for replays --- state/execution.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/state/execution.go b/state/execution.go index 601abec9e4e..dfda1e9f4be 100644 --- a/state/execution.go +++ b/state/execution.go @@ -230,7 +230,7 @@ func getBeginBlockValidatorInfo(block *types.Block, lastValSet *types.ValidatorS if block.Height > 1 { precommitLen := len(block.LastCommit.Precommits) valSetLen := len(lastValSet.Validators) - if precommitLen != valSetLen { + if valSetLen > 0 && precommitLen != valSetLen { // sanity check panic(fmt.Sprintf("precommit length (%d) doesn't match valset length (%d) at height %d\n\n%v\n\n%v", precommitLen, valSetLen, block.Height, block.LastCommit.Precommits, lastValSet.Validators)) @@ -386,7 +386,11 @@ func fireEvents(logger log.Logger, eventBus types.BlockEventPublisher, block *ty // It returns the application root hash (result of abci.Commit). func ExecCommitBlock(appConnConsensus proxy.AppConnConsensus, block *types.Block, logger log.Logger, lastValSet *types.ValidatorSet, stateDB dbm.DB) ([]byte, error) { - _, err := execBlockOnProxyApp(logger, appConnConsensus, block, lastValSet, stateDB) + + vs := &types.ValidatorSet{ + Validators: []*types.Validator{}, + } + _, err := execBlockOnProxyApp(logger, appConnConsensus, block, vs, stateDB) if err != nil { logger.Error("Error executing block on proxy app", "height", block.Height, "err", err) return nil, err