diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-07-01 01:43:45 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-07-03 17:34:41 +0200 |
commit | 607076d01bf23c69ac21950c17b01fb4e1130774 (patch) | |
tree | c77727a1faf8ef88e44271ff6e7ffebf25c2cbc3 /test/functional/mempool_accept.py | |
parent | 4af97c74edcda56cd15523bf3a335adea2bad14a (diff) | |
download | bitcoin-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/mempool_accept.py')
-rwxr-xr-x | test/functional/mempool_accept.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/mempool_accept.py b/test/functional/mempool_accept.py index 1705d957aa..ac7e78b92e 100755 --- a/test/functional/mempool_accept.py +++ b/test/functional/mempool_accept.py @@ -14,7 +14,7 @@ from test_framework.messages import ( COIN, COutPoint, CTxOut, - MAX_BLOCK_BASE_SIZE, + MAX_BLOCK_WEIGHT, MAX_MONEY, tx_from_hex, ) @@ -207,7 +207,7 @@ class MempoolAcceptanceTest(BitcoinTestFramework): self.log.info('A really large transaction') tx = tx_from_hex(raw_tx_reference) - tx.vin = [tx.vin[0]] * math.ceil(MAX_BLOCK_BASE_SIZE / len(tx.vin[0].serialize())) + tx.vin = [tx.vin[0]] * math.ceil(MAX_BLOCK_WEIGHT // 4 / len(tx.vin[0].serialize())) self.check_mempool_result( result_expected=[{'txid': tx.rehash(), 'allowed': False, 'reject-reason': 'bad-txns-oversize'}], rawtxs=[tx.serialize().hex()], |