Skip to content

Commit 63091b7

Browse files
committed
test: remove unnecessary -datacarriersize args from tests
1 parent 9f36962 commit 63091b7

15 files changed

+19
-31
lines changed

test/functional/feature_blocksxor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def set_test_params(self):
2323
self.extra_args = [[
2424
'-blocksxor=1',
2525
'-fastprune=1', # use smaller block files
26-
'-datacarriersize=100000', # needed to pad transaction with MiniWallet
2726
]]
2827

2928
def run_test(self):

test/functional/feature_maxuploadtarget.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def set_test_params(self):
5151
self.num_nodes = 1
5252
self.extra_args = [[
5353
f"-maxuploadtarget={UPLOAD_TARGET_MB}M",
54-
"-datacarriersize=100000",
5554
]]
5655
self.supports_cli = False
5756

test/functional/mempool_limit.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def set_test_params(self):
2929
self.setup_clean_chain = True
3030
self.num_nodes = 1
3131
self.extra_args = [[
32-
"-datacarriersize=100000",
3332
"-maxmempool=5",
3433
]]
3534
self.supports_cli = False

test/functional/mempool_package_limits.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ def run_test(self):
5151
self.test_anc_count_limits()
5252
self.test_anc_count_limits_2()
5353
self.test_anc_count_limits_bushy()
54-
55-
# The node will accept (nonstandard) extra large OP_RETURN outputs
56-
self.restart_node(0, extra_args=["-datacarriersize=100000"])
5754
self.test_anc_size_limits()
5855
self.test_desc_size_limits()
5956

test/functional/mempool_package_rbf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def set_test_params(self):
3333
self.setup_clean_chain = True
3434
# Required for fill_mempool()
3535
self.extra_args = [[
36-
"-datacarriersize=100000",
3736
"-maxmempool=5",
3837
]] * self.num_nodes
3938

test/functional/mempool_sigoplimit.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@
4444
class BytesPerSigOpTest(BitcoinTestFramework):
4545
def set_test_params(self):
4646
self.num_nodes = 1
47-
# allow large datacarrier output to pad transactions
48-
self.extra_args = [['-datacarriersize=100000']]
4947

5048
def create_p2wsh_spending_tx(self, witness_script, output_script):
5149
"""Create a 1-input-1-output P2WSH spending transaction with only the
@@ -139,7 +137,7 @@ def test_sigops_package(self):
139137
self.log.info("Test a overly-large sigops-vbyte hits package limits")
140138
# Make a 2-transaction package which fails vbyte checks even though
141139
# separately they would work.
142-
self.restart_node(0, extra_args=["-bytespersigop=5000","-permitbaremultisig=1"] + self.extra_args[0])
140+
self.restart_node(0, extra_args=["-bytespersigop=5000","-permitbaremultisig=1"])
143141

144142
def create_bare_multisig_tx(utxo_to_spend=None):
145143
_, pubkey = generate_keypair()
@@ -185,7 +183,7 @@ def run_test(self):
185183
else:
186184
bytespersigop_parameter = f"-bytespersigop={bytes_per_sigop}"
187185
self.log.info(f"Test sigops limit setting {bytespersigop_parameter}...")
188-
self.restart_node(0, extra_args=[bytespersigop_parameter] + self.extra_args[0])
186+
self.restart_node(0, extra_args=[bytespersigop_parameter])
189187

190188
for num_sigops in (69, 101, 142, 183, 222):
191189
self.test_sigops_limit(bytes_per_sigop, num_sigops)

test/functional/mempool_truc.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def check_mempool(self, txids):
4949
assert_equal(len(txids), len(mempool_contents))
5050
assert all([txid in txids for txid in mempool_contents])
5151

52-
@cleanup(extra_args=["-datacarriersize=20000"])
52+
@cleanup()
5353
def test_truc_max_vsize(self):
5454
node = self.nodes[0]
5555
self.log.info("Test TRUC-specific maximum transaction vsize")
@@ -63,7 +63,7 @@ def test_truc_max_vsize(self):
6363
tx_v2_heavy = self.wallet.send_self_transfer(from_node=node, target_vsize=TRUC_MAX_VSIZE + 1, version=2)
6464
self.check_mempool([tx_v2_heavy["txid"]])
6565

66-
@cleanup(extra_args=["-datacarriersize=1000"])
66+
@cleanup()
6767
def test_truc_acceptance(self):
6868
node = self.nodes[0]
6969
self.log.info("Test a child of a TRUC transaction cannot be more than 1000vB")
@@ -160,7 +160,7 @@ def test_truc_replacement(self):
160160
self.check_mempool([tx_v3_bip125_rbf_v2["txid"], tx_v3_parent["txid"], tx_v3_child["txid"]])
161161

162162

163-
@cleanup(extra_args=["-datacarriersize=40000"])
163+
@cleanup()
164164
def test_truc_reorg(self):
165165
node = self.nodes[0]
166166
self.log.info("Test that, during a reorg, TRUC rules are not enforced")
@@ -182,7 +182,7 @@ def test_truc_reorg(self):
182182
node.reconsiderblock(block[0])
183183

184184

185-
@cleanup(extra_args=["-limitdescendantsize=10", "-datacarriersize=40000"])
185+
@cleanup(extra_args=["-limitdescendantsize=10"])
186186
def test_nondefault_package_limits(self):
187187
"""
188188
Max standard tx size + TRUC rules imply the ancestor/descendant rules (at their default
@@ -215,7 +215,7 @@ def test_nondefault_package_limits(self):
215215
self.generate(node, 1)
216216

217217
self.log.info("Test that a decreased limitancestorsize also applies to v3 parent")
218-
self.restart_node(0, extra_args=["-limitancestorsize=10", "-datacarriersize=40000"])
218+
self.restart_node(0, extra_args=["-limitancestorsize=10"])
219219
tx_v3_parent_large2 = self.wallet.send_self_transfer(
220220
from_node=node,
221221
target_vsize=parent_target_vsize,
@@ -235,7 +235,7 @@ def test_nondefault_package_limits(self):
235235
assert_raises_rpc_error(-26, "too-long-mempool-chain, exceeds ancestor size limit", node.sendrawtransaction, tx_v3_child_large2["hex"])
236236
self.check_mempool([tx_v3_parent_large2["txid"]])
237237

238-
@cleanup(extra_args=["-datacarriersize=1000"])
238+
@cleanup()
239239
def test_truc_ancestors_package(self):
240240
self.log.info("Test that TRUC ancestor limits are checked within the package")
241241
node = self.nodes[0]
@@ -384,7 +384,7 @@ def test_sibling_eviction_package(self):
384384
assert_equal(result_package_cpfp["tx-results"][tx_sibling_3['wtxid']]['error'], expected_error_cpfp)
385385

386386

387-
@cleanup(extra_args=["-datacarriersize=1000"])
387+
@cleanup()
388388
def test_truc_package_inheritance(self):
389389
self.log.info("Test that TRUC inheritance is checked within package")
390390
node = self.nodes[0]

test/functional/mempool_updatefromblock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MempoolUpdateFromBlockTest(BitcoinTestFramework):
2828
def set_test_params(self):
2929
self.num_nodes = 1
3030
# Ancestor and descendant limits depend on transaction_graph_test requirements
31-
self.extra_args = [['-limitdescendantsize=1000', '-limitancestorsize=1000', f'-limitancestorcount={CUSTOM_ANCESTOR_COUNT}', f'-limitdescendantcount={CUSTOM_DESCENDANT_COUNT}', '-datacarriersize=100000']]
31+
self.extra_args = [['-limitdescendantsize=1000', '-limitancestorsize=1000', f'-limitancestorcount={CUSTOM_ANCESTOR_COUNT}', f'-limitdescendantcount={CUSTOM_DESCENDANT_COUNT}']]
3232

3333
def create_empty_fork(self, fork_length):
3434
'''

test/functional/mining_basic.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ def test_blockmintxfee_parameter(self):
187187
assert tx_below_min_feerate['txid'] not in block_template_txids
188188
assert tx_below_min_feerate['txid'] not in block_txids
189189

190+
# Restart node to clear mempool for the next test
191+
self.restart_node(0)
192+
190193
def test_timewarp(self):
191194
self.log.info("Test timewarp attack mitigation (BIP94)")
192195
node = self.nodes[0]
@@ -280,11 +283,9 @@ def verify_block_template(self, expected_tx_count, expected_weight):
280283
def test_block_max_weight(self):
281284
self.log.info("Testing default and custom -blockmaxweight startup options.")
282285

283-
# Restart the node to allow large transactions
284286
LARGE_TXS_COUNT = 10
285287
LARGE_VSIZE = int(((MAX_BLOCK_WEIGHT - DEFAULT_BLOCK_RESERVED_WEIGHT) / WITNESS_SCALE_FACTOR) / LARGE_TXS_COUNT)
286288
HIGH_FEERATE = Decimal("0.0003")
287-
self.restart_node(0, extra_args=[f"-datacarriersize={LARGE_VSIZE}"])
288289

289290
# Ensure the mempool is empty
290291
assert_equal(len(self.nodes[0].getrawmempool()), 0)
@@ -312,7 +313,7 @@ def test_block_max_weight(self):
312313
# Test block template creation with custom -blockmaxweight
313314
custom_block_weight = MAX_BLOCK_WEIGHT - 2000
314315
# Reducing the weight by 2000 units will prevent 1 large transaction from fitting into the block.
315-
self.restart_node(0, extra_args=[f"-datacarriersize={LARGE_VSIZE}", f"-blockmaxweight={custom_block_weight}"])
316+
self.restart_node(0, extra_args=[f"-blockmaxweight={custom_block_weight}"])
316317

317318
self.log.info("Testing the block template with custom -blockmaxweight to include 9 large and 2 normal transactions.")
318319
self.verify_block_template(
@@ -322,7 +323,7 @@ def test_block_max_weight(self):
322323

323324
# Ensure the block weight does not exceed the maximum
324325
self.log.info(f"Testing that the block weight will never exceed {MAX_BLOCK_WEIGHT - DEFAULT_BLOCK_RESERVED_WEIGHT}.")
325-
self.restart_node(0, extra_args=[f"-datacarriersize={LARGE_VSIZE}", f"-blockmaxweight={MAX_BLOCK_WEIGHT}"])
326+
self.restart_node(0, extra_args=[f"-blockmaxweight={MAX_BLOCK_WEIGHT}"])
326327
self.log.info("Sending 2 additional normal transactions to fill the mempool to the maximum block weight.")
327328
self.send_transactions(utxos[LARGE_TXS_COUNT + 2:], NORMAL_FEERATE, NORMAL_VSIZE)
328329
self.log.info(f"Testing that the mempool's weight matches the maximum block weight: {MAX_BLOCK_WEIGHT}.")
@@ -336,7 +337,7 @@ def test_block_max_weight(self):
336337

337338
self.log.info("Test -blockreservedweight startup option.")
338339
# Lowering the -blockreservedweight by 4000 will allow for two more transactions.
339-
self.restart_node(0, extra_args=[f"-datacarriersize={LARGE_VSIZE}", "-blockreservedweight=4000"])
340+
self.restart_node(0, extra_args=["-blockreservedweight=4000"])
340341
self.verify_block_template(
341342
expected_tx_count=12,
342343
expected_weight=MAX_BLOCK_WEIGHT - 4000,

test/functional/mining_prioritisetransaction.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def set_test_params(self):
2727
self.num_nodes = 1
2828
self.extra_args = [[
2929
"-printpriority=1",
30-
"-datacarriersize=100000",
3130
]] * self.num_nodes
3231
self.supports_cli = False
3332

0 commit comments

Comments
 (0)