v31.1-roots.1 · Commit 2: [PATCH 02/17] feat(policy): preserve Roots parsing and local transaction checks
test/functional/mempool_truc.py
Before: test/functional/mempool_truc.py · After: test/functional/mempool_truc.py
File metadata
index 2586308e4d3711cbf9588e6aaf730b2f6bf9b886..14b49ddad40f0e944624f61c7d4f058d380c01c1 100755
Download original patch · Release notes
Diff rows 1–40 of 40. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
test/functional/mempool_truc.py
CHANGED
|
@@ -31,7 +31,7 @@ def cleanup(extra_args=None):
|
|
|
31
31
|
def wrapper(self):
|
|
32
32
|
try:
|
|
33
33
|
if extra_args is not None:
|
|
34
|
-
self.restart_node(0, extra_args=extra_args)
|
|
34
|
+
self.restart_node(0, extra_args=self.extra_args[0] + extra_args)
|
|
35
35
|
func(self)
|
|
36
36
|
finally:
|
|
37
37
|
# Clear mempool again after test
|
|
@@ -44,7 +44,7 @@ def cleanup(extra_args=None):
|
|
|
44
44
|
class MempoolTRUC(BitcoinTestFramework):
|
|
45
45
|
def set_test_params(self):
|
|
46
46
|
self.num_nodes = 1
|
|
47
|
-
self.extra_args = [[]]
|
|
47
|
+
self.extra_args = [["-maxscriptsize=1000000", "-datacarriersize=1000000"]]
|
|
48
48
|
self.setup_clean_chain = True
|
|
49
49
|
|
|
50
50
|
def check_mempool(self, txids):
|
|
@@ -241,7 +241,7 @@ class MempoolTRUC(BitcoinTestFramework):
|
|
|
241
241
|
self.generate(node, 1)
|
|
242
242
|
|
|
243
243
|
self.log.info("Test that a decreased limitclustersize also applies to TRUC child")
|
|
244
|
-
self.restart_node(0, extra_args=["-limitclustersize=10", "-acceptnonstdtxn=1"])
|
|
244
|
+
self.restart_node(0, extra_args=self.extra_args[0] + ["-limitclustersize=10", "-acceptnonstdtxn=1"])
|
|
245
245
|
tx_v3_parent_large2 = self.wallet.send_self_transfer(from_node=node, target_vsize=parent_target_vsize, version=3)
|
|
246
246
|
tx_v3_child_large2 = self.wallet.create_self_transfer(utxo_to_spend=tx_v3_parent_large2["new_utxo"], target_vsize=child_target_vsize, version=3)
|
|
247
247
|
# Parent and child are within TRUC limits
|
|
@@ -249,7 +249,7 @@ class MempoolTRUC(BitcoinTestFramework):
|
|
|
249
249
|
assert_greater_than_or_equal(TRUC_CHILD_MAX_VSIZE, tx_v3_child_large2["tx"].get_vsize())
|
|
250
250
|
assert_raises_rpc_error(-26, "too-large-cluster", node.sendrawtransaction, tx_v3_child_large2["hex"])
|
|
251
251
|
self.log.info("Test that a decreased limitclustercount also applies to TRUC transactions")
|
|
252
|
-
self.restart_node(0, extra_args=["-limitclustercount=1", "-acceptnonstdtxn=1"])
|
|
252
|
+
self.restart_node(0, extra_args=self.extra_args[0] + ["-limitclustercount=1", "-acceptnonstdtxn=1"])
|
|
253
253
|
assert_raises_rpc_error(-26, "too-large-cluster", node.sendrawtransaction, tx_v3_child_large2["hex"])
|
|
254
254
|
self.check_mempool([tx_v3_parent_large2["txid"]])
|
|
255
255
|
|
|
@@ -617,7 +617,7 @@ class MempoolTRUC(BitcoinTestFramework):
|
|
|
617
617
|
for minrelay_setting in (0, 5, 10, 100, 500, 1000, 5000, 333333, 2500000):
|
|
618
618
|
self.log.info(f"-> Test -minrelaytxfee={minrelay_setting}sat/kvB...")
|
|
619
619
|
setting_decimal = minrelay_setting / Decimal(COIN)
|
|
620
|
-
self.restart_node(0, extra_args=[f"-minrelaytxfee={setting_decimal:.8f}", "-persistmempool=0"])
|
|
620
|
+
self.restart_node(0, extra_args=self.extra_args[0] + [f"-minrelaytxfee={setting_decimal:.8f}", "-persistmempool=0"])
|
|
621
621
|
minrelayfeerate = node.getmempoolinfo()["minrelaytxfee"]
|
|
622
622
|
high_feerate = minrelayfeerate * 50
|
|
623
623
|
|