state: move pruneBlocks from consensus/state to state/execution (#9443)

This commit is contained in:
JayT106
2022-09-20 05:30:22 -04:00
committed by GitHub
parent a8efef1854
commit db26cff58f
17 changed files with 123 additions and 83 deletions

View File

@@ -103,7 +103,7 @@ func newReactor(
DiscardABCIResponses: false,
})
blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(),
mp, sm.EmptyEvidencePool{})
mp, sm.EmptyEvidencePool{}, blockStore)
if err = stateStore.Save(state); err != nil {
panic(err)
}
@@ -136,7 +136,7 @@ func newReactor(
require.NoError(t, err)
blockID := types.BlockID{Hash: thisBlock.Hash(), PartSetHeader: thisParts.Header()}
state, _, err = blockExec.ApplyBlock(state, blockID, thisBlock)
state, err = blockExec.ApplyBlock(state, blockID, thisBlock)
if err != nil {
panic(fmt.Errorf("error apply block: %w", err))
}