diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-02-21 10:23:08 -0800 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-02-21 10:23:20 -0800 |
commit | e9fc8f6e7f572224d2bd4577eee6d538331ef663 (patch) | |
tree | aec056917cd58344f8d8e8c05ea1910a6ce63727 /doc | |
parent | eb3c6b0912349873113bfd49baf1c505bb48d9cf (diff) | |
parent | d6d2602a32251c1017da88b47c801b7283c66ce3 (diff) |
Merge #18172: test: Transaction expiry from mempool
d6d2602a32251c1017da88b47c801b7283c66ce3 add: test that transactions expire from mempool (0xb10c)
Pull request description:
This adds the functional test `mempool_expiry.py` covering mempool transaction expiry. Both the default `DEFAULT_MEMPOOL_EXPIRY` of 336 hours (two weeks, set in #9312) and the user definable mempool expiry via the `-mempoolexpiry=<n>` command line option are tested. The test checks that descendants of expired transactions are removed as well.
*Notes for reviewers*
- `LimitMempoolSize()` (which is the only caller of `CTxMemPool::Expire()`) is only called when a transaction is added to the mempool. In order to test expiry of a transaction-that-should-expire, the mocktime is set and a random transaction is broadcast to trigger `LimitMempoolSize()`. The transaction-that-should-expire is then checked for expiry. LMK if there is another way, but I don't think there is.
ACKs for top commit:
MarcoFalke:
ACK d6d2602a32251c1017da88b47c801b7283c66ce3
theStack:
ACK https://github.com/bitcoin/bitcoin/pull/18172/commits/d6d2602a32251c1017da88b47c801b7283c66ce3
promag:
Code review ACK d6d2602a32251c1017da88b47c801b7283c66ce3.
Tree-SHA512: eb68cd9e2d870872b8e8e1522fed8954fb99cc9e4edda4b28bb2a4e41cddbc53fe6f7d9c090f1e0e98ab49beb24bf37ff3787a9e9801a95e8ae9ca9eb34fe6f0
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions