-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Add removemempoolentry RPC to evict transactions from the mempool #16523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ts descendants from the mempool This command is useful for testing the behavior of double-spends when iteracting with Core on regtest. Since this RPC likely should not be used on livenet, it is hidden from help, similarly to invalidateblock.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
This is indeed similar to #15873 which I hadn't seen before this. The primary difference is that the RPC is hidden and the test might be a little more comprehensive. I'm also open to making this RPC only available on regtest, since it is only intended for testing purposes. |
@metalicjames have you read the suggestions in #15873? |
@promag I could modify code from Core's tests to generate my own blocks for testing in my project, but that seems vastly out-of-scope for what I'm trying to do. It would be much easier to orchestrate a double-spending reorg on regtest using existing RPCs with the addition of this one. |
Concept NACK, for the same reasons given in #15873 |
I think your particular use can can be achieved with something like #10823 (potentially in combination with |
Needs rebase |
Going to close this re the discussion in #15873. |
@metalicjames Just wanted to bring #17693 to your attention. |
This command is useful for testing the behavior of double-spends when iteracting with Core on regtest. Since this RPC likely should not be used on livenet, it is hidden from
help
, similarly toinvalidateblock
.The intended usecase for this RPC is to allow for conflicting transactions to be added to the mempool that do not satisfy RBF rules. This would allow a fork to be generated with a double-spend in integration tests with other software in order to simulate a reorg and double-spend event.
The RPC itself simply exposes the
removeRecursive
public mempool method to the RPC interface and introduces a newMANUAL
mempool removal reason. The pull request includes a functional test for its intended behavior.