diff options
author | Andrew Chow <github@achow101.com> | 2023-08-22 16:53:03 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-08-22 17:03:37 -0400 |
commit | 5aa67eb3655a0023f0cf115176fc8d5bac53cdcd (patch) | |
tree | 3b04e3475dd711b963c5073c1b7f9cc547645b97 /test/functional/test_runner.py | |
parent | 8372ab0ea3c88308aabef476e3b9d023ba3fd4b7 (diff) | |
parent | 9eac5a0529f869075f0331e40d322c34fc8fc2af (diff) |
Merge bitcoin/bitcoin#28199: test: tx orphan handling
9eac5a0529f869075f0331e40d322c34fc8fc2af [functional test] transaction orphan handling (glozow)
61e77bb901bca038b46064dc4531e12c2ab50673 [test framework] make it easier to fast-forward setmocktime (glozow)
Pull request description:
I was doing some mutation testing (through reckless refactoring) locally and found some specific behaviors in orphan handling that weren't picked up by tests. Adding some of these test cases now can maybe help with reviewing refactors like #28031.
- Parent requests aren't sent immediately. A delay is added and the requests are filtered by AlreadyHaveTx before they are sent, which means you can't use fake orphans to probe precise arrival timing of a tx.
- Parent requests include all that are not AlreadyHaveTx. This means old confirmed parents may be requested.
- The node does not give up on orphans if the peer responds to a parent request with notfound. This means that if a parent is an old confirmed transaction (in which notfound is expected), the orphan should still be resolved.
- Rejected parents can cause an orphan to be dropped, but it depends on the reason and only based on txid.
- Rejected parents can cause an orphan to be rejected too, by both wtxid and txid.
- Requests for orphan parents should be de-duplicated with "regular" txrequest. If a missing parent has the same hash as an in-flight request, it shouldn't be requested.
- Multiple orphans with overlapping parents should not cause duplicated parent requests.
ACKs for top commit:
instagibbs:
reACK https://github.com/bitcoin/bitcoin/pull/28199/commits/9eac5a0529f869075f0331e40d322c34fc8fc2af
dergoegge:
reACK 9eac5a0529f869075f0331e40d322c34fc8fc2af
achow101:
ACK 9eac5a0529f869075f0331e40d322c34fc8fc2af
fjahr:
Code review ACK 9eac5a0529f869075f0331e40d322c34fc8fc2af
Tree-SHA512: 85488dc6a3f62cf0c38e7dfe7839c01215b44b172d1755b18164d41d01038f3a749451241e4eba8b857fd344a445740b21d6382c45977234b21460e3f53b1b2a
Diffstat (limited to 'test/functional/test_runner.py')
-rwxr-xr-x | test/functional/test_runner.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index d93e6fd6da..0c19a9ff93 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -123,6 +123,7 @@ BASE_SCRIPTS = [ 'feature_abortnode.py', 'wallet_address_types.py --legacy-wallet', 'wallet_address_types.py --descriptors', + 'p2p_orphan_handling.py', 'wallet_basic.py --legacy-wallet', 'wallet_basic.py --descriptors', 'feature_maxtipage.py', |