Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 3: [PATCH 03/17] feat(policy): preserve cluster accounting and repair dynamic dust

test/functional/mempool_ephemeral_dust.py

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

File metadata
index a5fef6e71746fcf9c077984b2a1c81cf7c9c8d13..810cd5680430f7a66d8ae46966e41d9f780d7d40 100755

Download original patch · Release notes

Diff rows 1–27 of 27. 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
@@ -29,7 +29,7 @@ class EphemeralDustTest(BitcoinTestFramework):
29
29
  # Mempools should match via 1P1C p2p relay
30
30
  self.num_nodes = 2
31
31
  # Exercise native dust packages with the Roots local send exception enabled.
32
- self.extra_args = [["-permitephemeral=1"]] * self.num_nodes
32
+ self.extra_args = [["-permitephemeral=1", "-subdustfeepenalty=0"]] * self.num_nodes
33
33
 
34
34
  # Don't test trickling logic
35
35
  self.noban_tx_relay = True
@@ -219,15 +219,13 @@ class EphemeralDustTest(BitcoinTestFramework):
219
219
  assert_mempool_contents(self, self.nodes[0], expected=[])
220
220
 
221
221
  def test_non_truc(self):
222
- self.log.info("Test that v2 dust-having transaction is also accepted if spent")
223
-
222
+ self.log.info("Test that v2 dust packages retain the individual relay requirement")
224
223
  assert_equal(self.nodes[0].getrawmempool(), [])
225
224
  dusty_tx, sweep_tx = self.create_ephemeral_dust_package(tx_version=2)
226
-
227
225
  res = self.nodes[0].submitpackage([dusty_tx["hex"], sweep_tx["hex"]])
228
- assert_equal(res["package_msg"], "success")
229
- assert_mempool_contents(self, self.nodes[0], expected=[dusty_tx["tx"], sweep_tx["tx"]])
230
- self.generate(self.nodes[0], 1)
226
+ assert_equal(res["package_msg"], "transaction failed")
227
+ assert "min relay fee not met" in res["tx-results"][dusty_tx["wtxid"]]["error"]
228
+ assert_equal(self.nodes[0].getrawmempool(), [])
231
229
 
232
230
  def test_unspent_ephemeral(self):
233
231
  self.log.info("Test that spending from a tx with ephemeral outputs is only allowed if dust is spent as well")