aboutsummaryrefslogtreecommitdiff
path: root/test/functional/mining_prioritisetransaction.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-07-01 01:43:45 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-07-03 17:34:41 +0200
commit607076d01bf23c69ac21950c17b01fb4e1130774 (patch)
treec77727a1faf8ef88e44271ff6e7ffebf25c2cbc3 /test/functional/mining_prioritisetransaction.py
parent4af97c74edcda56cd15523bf3a335adea2bad14a (diff)
downloadbitcoin-607076d01bf23c69ac21950c17b01fb4e1130774.tar.xz
test: remove confusing `MAX_BLOCK_BASE_SIZE`
The constant `MAX_BLOCK_BASE_SIZE` has been removed from the core implementation years ago due to being confusing and superfluous, as it is implied by the block weight limit (see PRs #10618 and #10608). Since there is also no point in still keeping it in the functional test framework, we switch to weight-based accounting on the relevant test code parts and use `MAX_BLOCK_WEIGHT` instead for the block limit checks.
Diffstat (limited to 'test/functional/mining_prioritisetransaction.py')
-rwxr-xr-xtest/functional/mining_prioritisetransaction.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/mining_prioritisetransaction.py b/test/functional/mining_prioritisetransaction.py
index 1426fdaacb..9fc38ebf53 100755
--- a/test/functional/mining_prioritisetransaction.py
+++ b/test/functional/mining_prioritisetransaction.py
@@ -6,7 +6,7 @@
import time
-from test_framework.messages import COIN, MAX_BLOCK_BASE_SIZE
+from test_framework.messages import COIN, MAX_BLOCK_WEIGHT
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal, assert_raises_rpc_error, create_confirmed_utxos, create_lots_of_big_transactions, gen_return_txouts
@@ -61,15 +61,15 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
txids[i] = create_lots_of_big_transactions(self.nodes[0], self.txouts, utxos[start_range:end_range], end_range - start_range, (i+1)*base_fee)
# Make sure that the size of each group of transactions exceeds
- # MAX_BLOCK_BASE_SIZE -- otherwise the test needs to be revised to create
- # more transactions.
+ # MAX_BLOCK_WEIGHT // 4 -- otherwise the test needs to be revised to
+ # create more transactions.
mempool = self.nodes[0].getrawmempool(True)
sizes = [0, 0, 0]
for i in range(3):
for j in txids[i]:
assert j in mempool
sizes[i] += mempool[j]['vsize']
- assert sizes[i] > MAX_BLOCK_BASE_SIZE # Fail => raise utxo_count
+ assert sizes[i] > MAX_BLOCK_WEIGHT // 4 # Fail => raise utxo_count
# add a fee delta to something in the cheapest bucket and make sure it gets mined
# also check that a different entry in the cheapest bucket is NOT mined