Skip to content

code(chore): Test mempool Msg::Reap{..} handling is wrong #1166

@ancazamfir

Description

@ancazamfir

When a proposal is built, transactions should not be removed from the mempool as the proposal may not be accepted. Transactions should be removed only after the proposal is decided, during app commit phase.
We need to somehow keep track of how many transactions have been reaped and skip them in subsequent 'reap: loop iteration.
maybe add something like:

    TakeFrom { 
        start_index: usize, 
        max_count: usize,
        reply: RpcReplyPort<(Vec<RawTx>, usize)> // (transactions, next_start_index)
    },

Or add a streaming iterator that can work with fifo mempool like our test impl

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions