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

@@ -808,6 +808,7 @@ func NewNode(config *cfg.Config,
proxyApp.Consensus(),
mempool,
evidencePool,
blockStore,
sm.BlockExecutorWithMetrics(smMetrics),
)

View File

@@ -305,6 +305,7 @@ func TestCreateProposalBlock(t *testing.T) {
proxyApp.Consensus(),
mempool,
evidencePool,
blockStore,
)
commit := types.NewCommit(height-1, 0, types.BlockID{}, nil)
@@ -376,6 +377,8 @@ func TestMaxProposalBlockSize(t *testing.T) {
)
}
blockStore := store.NewBlockStore(dbm.NewMemDB())
// fill the mempool with one txs just below the maximum size
txLength := int(types.MaxDataBytesNoEvidence(maxBytes, 1))
tx := tmrand.Bytes(txLength - 4) // to account for the varint
@@ -388,6 +391,7 @@ func TestMaxProposalBlockSize(t *testing.T) {
proxyApp.Consensus(),
mempool,
sm.EmptyEvidencePool{},
blockStore,
)
commit := types.NewCommit(height-1, 0, types.BlockID{}, nil)