Testing the "one more" on top of "one more", making sure this is rejected.
Expand on contracting carve-out rule test #18723
pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:onemore_again changing 1 files +18 −6-
instagibbs commented at 2:01 PM on April 21, 2020: member
- DrahtBot added the label Tests on Apr 21, 2020
-
in test/functional/mempool_package_onemore.py:60 in c5db55a6a0 outdated
54 | # MAX_ANCESTORS transactions off a confirmed tx should be fine 55 | chain = [] 56 | - for _ in range(4): 57 | + # First tx has 3 outputs 58 | + (txid, sent_value) = self.chain_transaction(self.nodes[0], [txid], [vout], value, fee, 3) 59 | + vout = 0
jonatack commented at 6:59 PM on April 21, 2020:afaict
voutis always zero anyway? same for line 63 below...
instagibbs commented at 6:52 PM on August 10, 2020:removed for line 63, otherwise I think this is more clear personally
in test/functional/mempool_package_onemore.py:61 in c5db55a6a0 outdated
55 | chain = [] 56 | - for _ in range(4): 57 | + # First tx has 3 outputs 58 | + (txid, sent_value) = self.chain_transaction(self.nodes[0], [txid], [vout], value, fee, 3) 59 | + vout = 0 60 | + value = sent_value
jonatack commented at 7:00 PM on April 21, 2020:redundant assignment in this loop (and the next one), can remove?
if not, may make sense to extract the loop body to a function
in test/functional/mempool_package_onemore.py:58 in c5db55a6a0 outdated
52 | + 53 | fee = Decimal("0.0002") 54 | # MAX_ANCESTORS transactions off a confirmed tx should be fine 55 | chain = [] 56 | - for _ in range(4): 57 | + # First tx has 3 outputs
jonatack commented at 7:02 PM on April 21, 2020:verified, this is correct, first tx has 3 outputs and the next three txs have 2 outputs
instagibbs commented at 7:15 PM on April 21, 2020:heh I supposed this should just be an assert
in test/functional/mempool_package_onemore.py:91 in c5db55a6a0 outdated
85 | @@ -79,6 +86,10 @@ def run_test(self): 86 | # and the second chain should work just fine 87 | self.chain_transaction(self.nodes[0], [second_chain], [0], second_chain_value, fee, 1) 88 | 89 | + # But now that we're at the additional carve-out limit, the third base output being spent will be rejected 90 | + # For both ancestor's descendant limits 91 | + assert_raises_rpc_error(-26, "too-long-mempool-chain, too many descendants", self.chain_transaction, self.nodes[0], [chain[0][0]], [2], chain[0][1], fee, 1)
jonatack commented at 7:07 PM on April 21, 2020:"too-long-mempool-chain, too many descendants" used 5x, could hoist to a
TOO_MANY_DESCENDANTSconstant
instagibbs commented at 6:51 PM on August 10, 2020:done
in test/functional/mempool_package_onemore.py:53 in c5db55a6a0 outdated
47 | @@ -48,10 +48,17 @@ def run_test(self): 48 | vout = utxo[0]['vout'] 49 | value = utxo[0]['amount'] 50 | 51 | + assert_equal(len(self.nodes[0].getrawmempool(True)), 0)
jonatack commented at 7:08 PM on April 21, 2020:perhaps add a comment why
instagibbs commented at 6:51 PM on August 10, 2020:done
jonatack commented at 7:10 PM on April 21, 2020: memberACK c5db55a6a00918ed74c9fd modulo comments (feel free to ignore the nits)
instagibbs force-pushed on Aug 10, 2020Expand on contracting carve-out rule test 08dce519e5instagibbs force-pushed on Aug 10, 2020instagibbs closed this on Oct 26, 2020DrahtBot locked this on Feb 15, 2022ContributorsLabels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-23 00:14 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me