aboutsummaryrefslogtreecommitdiff
path: root/test/functional/mempool_package_onemore.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2022-08-09 14:44:26 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2022-08-09 14:59:47 +0200
commit0fda1c7df6165a60f63ced139ed10169f5df55f8 (patch)
tree62cb4efc462a5d8b175124277d6a2007d13d8d51 /test/functional/mempool_package_onemore.py
parentc012875b9ded0a5183602f002738ca823d559518 (diff)
downloadbitcoin-0fda1c7df6165a60f63ced139ed10169f5df55f8.tar.xz
scripted-diff: test: rename `MAX_{ANCESTORS,DESCENDANTS}` to `DEFAULT_{ANCESTOR,DESCENDANT}_LIMIT`
-BEGIN VERIFY SCRIPT- ren() { sed -i "s:$1:$2:g" $(git grep -l "$1" ./test); } ren MAX_ANCESTORS_CUSTOM CUSTOM_ANCESTOR_LIMIT ren MAX_DESCENDANTS_CUSTOM CUSTOM_DESCENDANT_LIMIT ren MAX_ANCESTORS DEFAULT_ANCESTOR_LIMIT ren MAX_DESCENDANTS DEFAULT_DESCENDANT_LIMIT -END VERIFY SCRIPT-
Diffstat (limited to 'test/functional/mempool_package_onemore.py')
-rwxr-xr-xtest/functional/mempool_package_onemore.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/mempool_package_onemore.py b/test/functional/mempool_package_onemore.py
index 423a5bf2ee..11e3adb700 100755
--- a/test/functional/mempool_package_onemore.py
+++ b/test/functional/mempool_package_onemore.py
@@ -15,8 +15,8 @@ from test_framework.util import (
from test_framework.wallet import MiniWallet
-MAX_ANCESTORS = 25
-MAX_DESCENDANTS = 25
+DEFAULT_ANCESTOR_LIMIT = 25
+DEFAULT_DESCENDANT_LIMIT = 25
class MempoolPackagesTest(BitcoinTestFramework):
@@ -34,19 +34,19 @@ class MempoolPackagesTest(BitcoinTestFramework):
self.wallet = MiniWallet(self.nodes[0])
self.wallet.rescan_utxos()
- # MAX_ANCESTORS transactions off a confirmed tx should be fine
+ # DEFAULT_ANCESTOR_LIMIT transactions off a confirmed tx should be fine
chain = []
utxo = self.wallet.get_utxo()
for _ in range(4):
utxo, utxo2 = self.chain_tx([utxo], num_outputs=2)
chain.append(utxo2)
- for _ in range(MAX_ANCESTORS - 4):
+ for _ in range(DEFAULT_ANCESTOR_LIMIT - 4):
utxo, = self.chain_tx([utxo])
chain.append(utxo)
second_chain, = self.chain_tx([self.wallet.get_utxo()])
- # Check mempool has MAX_ANCESTORS + 1 transactions in it
- assert_equal(len(self.nodes[0].getrawmempool()), MAX_ANCESTORS + 1)
+ # Check mempool has DEFAULT_ANCESTOR_LIMIT + 1 transactions in it
+ assert_equal(len(self.nodes[0].getrawmempool()), DEFAULT_ANCESTOR_LIMIT + 1)
# Adding one more transaction on to the chain should fail.
assert_raises_rpc_error(-26, "too-long-mempool-chain, too many unconfirmed ancestors [limit: 25]", self.chain_tx, [utxo])
@@ -67,7 +67,7 @@ class MempoolPackagesTest(BitcoinTestFramework):
self.nodes[0].sendrawtransaction(replacable_tx.serialize().hex())
# Finally, check that we added two transactions
- assert_equal(len(self.nodes[0].getrawmempool()), MAX_ANCESTORS + 3)
+ assert_equal(len(self.nodes[0].getrawmempool()), DEFAULT_ANCESTOR_LIMIT + 3)
if __name__ == '__main__':