Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 2: [PATCH 02/17] feat(policy): preserve Roots parsing and local transaction checks

test/functional/mempool_ephemeral_dust.py

Before: test/functional/mempool_ephemeral_dust.py · After: test/functional/mempool_ephemeral_dust.py

File metadata
index 61dd4c7102dde419404e6ecff89518fbfe1dd744..a5fef6e71746fcf9c077984b2a1c81cf7c9c8d13 100755

Download original patch · Release notes

Diff rows 1–48 of 48. 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_ephemeral_dust.py CHANGED
@@ -28,6 +28,8 @@ class EphemeralDustTest(BitcoinTestFramework):
28
28
  def set_test_params(self):
29
29
  # Mempools should match via 1P1C p2p relay
30
30
  self.num_nodes = 2
31
+ # Exercise native dust packages with the Roots local send exception enabled.
32
+ self.extra_args = [["-permitephemeral=1"]] * self.num_nodes
31
33
 
32
34
  # Don't test trickling logic
33
35
  self.noban_tx_relay = True
@@ -200,8 +202,8 @@ class EphemeralDustTest(BitcoinTestFramework):
200
202
  self.log.info("Test that a single output of any satoshi amount is allowed, not checking spending")
201
203
 
202
204
  # We aren't checking spending, allow it in with no fee
203
- self.restart_node(0, extra_args=["-minrelaytxfee=0"])
204
- self.restart_node(1, extra_args=["-minrelaytxfee=0"])
205
+ self.restart_node(0, extra_args=self.extra_args[0] + ["-minrelaytxfee=0"])
206
+ self.restart_node(1, extra_args=self.extra_args[0] + ["-minrelaytxfee=0"])
205
207
  self.connect_nodes(0, 1)
206
208
 
207
209
  # 330 is dust threshold for taproot outputs
@@ -211,8 +213,8 @@ class EphemeralDustTest(BitcoinTestFramework):
211
213
  test_res = self.nodes[0].testmempoolaccept([dusty_tx["hex"]])
212
214
  assert test_res[0]["allowed"]
213
215
 
214
- self.restart_node(0, extra_args=[])
215
- self.restart_node(1, extra_args=[])
216
+ self.restart_node(0, extra_args=self.extra_args[0])
217
+ self.restart_node(1, extra_args=self.extra_args[1])
216
218
  self.connect_nodes(0, 1)
217
219
  assert_mempool_contents(self, self.nodes[0], expected=[])
218
220
 
@@ -407,8 +409,8 @@ class EphemeralDustTest(BitcoinTestFramework):
407
409
  self.log.info("Test that ephemeral dust works in non-TRUC contexts when there's no minrelay requirement")
408
410
 
409
411
  # Note: since minrelay is 0, it is not testing 1P1C relay
410
- self.restart_node(0, extra_args=["-minrelaytxfee=0"])
411
- self.restart_node(1, extra_args=["-minrelaytxfee=0"])
412
+ self.restart_node(0, extra_args=self.extra_args[0] + ["-minrelaytxfee=0"])
413
+ self.restart_node(1, extra_args=self.extra_args[0] + ["-minrelaytxfee=0"])
412
414
  self.connect_nodes(0, 1)
413
415
 
414
416
  assert_equal(self.nodes[0].getrawmempool(), [])
@@ -472,8 +474,8 @@ class EphemeralDustTest(BitcoinTestFramework):
472
474
 
473
475
  # Other topology tests (e.g., grandparents and parents both with dust) require relaxation of submitpackage topology
474
476
 
475
- self.restart_node(0, extra_args=[])
476
- self.restart_node(1, extra_args=[])
477
+ self.restart_node(0, extra_args=self.extra_args[0])
478
+ self.restart_node(1, extra_args=self.extra_args[1])
477
479
  self.connect_nodes(0, 1)
478
480
 
479
481
  assert_equal(self.nodes[0].getrawmempool(), [])