diff options
author | Ava Chow <github@achow101.com> | 2024-08-05 17:25:57 -0400 |
---|---|---|
committer | Ava Chow <github@achow101.com> | 2024-08-05 17:25:57 -0400 |
commit | dd7e12a3de6b8827ab101db4eca7c34358ce1954 (patch) | |
tree | 74a10c76b95c9d38423860b071ec3be536de408c /src/txorphanage.h | |
parent | 902dd14382256c9d33bce667795a64079f3bee6b (diff) | |
parent | 172c1ad026cc38c6f52679e74c14579ecc77c48e (diff) |
Merge bitcoin/bitcoin#30082: test: expand LimitOrphan and EraseForPeer coverage
172c1ad026cc38c6f52679e74c14579ecc77c48e test: expand LimitOrphan and EraseForPeer coverage (Greg Sanders)
28dbe218feef51cbc28051273334dd73ba4500c0 refactor: move orphanage constants to header file (Greg Sanders)
Pull request description:
Inspired by refactorings in #30000 as the coverage appeared a bit sparse.
Added some minimal border value testing, timeouts, and tightened existing assertions.
ACKs for top commit:
achow101:
ACK 172c1ad026cc38c6f52679e74c14579ecc77c48e
rkrux:
reACK [172c1ad](https://github.com/bitcoin/bitcoin/pull/30082/commits/172c1ad026cc38c6f52679e74c14579ecc77c48e)
glozow:
reACK 172c1ad026cc38c6f52679e74c14579ecc77c48e
Tree-SHA512: e8fa9b1de6a8617612bbe9b132c9c0c9b5a651ec94fd8c91042a34a8c91c5f9fa7ec4175b47e2b97d1320d452c23775be671a9970613533e68e81937539a7d70
Diffstat (limited to 'src/txorphanage.h')
-rw-r--r-- | src/txorphanage.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/txorphanage.h b/src/txorphanage.h index f3f73ce0f2..2c53d1d40f 100644 --- a/src/txorphanage.h +++ b/src/txorphanage.h @@ -14,6 +14,11 @@ #include <map> #include <set> +/** Expiration time for orphan transactions */ +static constexpr auto ORPHAN_TX_EXPIRE_TIME{20min}; +/** Minimum time between orphan transactions expire time checks */ +static constexpr auto ORPHAN_TX_EXPIRE_INTERVAL{5min}; + /** A class to track orphan transactions (failed on TX_MISSING_INPUTS) * Since we cannot distinguish orphans from bad transactions with * non-existent inputs, we heavily limit the number of orphans |