v31.1-roots.1 · Commit 2: [PATCH 02/17] feat(policy): preserve Roots parsing and local transaction checks
test/functional/mempool_dust.py
Before: test/functional/mempool_dust.py · After: test/functional/mempool_dust.py
File metadata
index 957cfccccf61ad95b6951c13584d8bbdb609ac4b..eba54a94e0593428ed204b96a9b06b89dec92578 100755
Download original patch · Release notes
Diff rows 1–32 of 32. 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_dust.py
CHANGED
|
@@ -40,7 +40,7 @@ DUST_RELAY_TX_FEE = 3000 # default setting [sat/kvB]
|
|
|
40
40
|
class DustRelayFeeTest(BitcoinTestFramework):
|
|
41
41
|
def set_test_params(self):
|
|
42
42
|
self.num_nodes = 1
|
|
43
|
-
self.extra_args = [['-permitbaremultisig']]
|
|
43
|
+
self.extra_args = [['-permitbaremultisig', '-permitbarepubkey']]
|
|
44
44
|
|
|
45
45
|
def test_dust_output(self, node: TestNode, dust_relay_fee: Decimal,
|
|
46
46
|
output_script: CScript, type_desc: str) -> None:
|
|
@@ -66,7 +66,7 @@ class DustRelayFeeTest(BitcoinTestFramework):
|
|
|
66
66
|
tx.vout[1].nValue -= 1
|
|
67
67
|
res = node.testmempoolaccept([tx.serialize().hex()])[0]
|
|
68
68
|
assert_equal(res['allowed'], False)
|
|
69
|
-
assert_equal(res['reject-reason'], 'dust')
|
|
69
|
+
assert_equal(res['reject-reason'], 'dust-nonanchor')
|
|
70
70
|
|
|
71
71
|
# finally send the transaction to avoid running out of MiniWallet UTXOs
|
|
72
72
|
self.wallet.sendrawtransaction(from_node=node, tx_hex=tx_good_hex)
|
|
@@ -95,7 +95,7 @@ class DustRelayFeeTest(BitcoinTestFramework):
|
|
|
95
95
|
assert_equal(len(mempool_entries), 2)
|
|
96
96
|
|
|
97
97
|
# Wipe extra arg to reset dust relay
|
|
98
|
-
self.restart_node(0, extra_args=[])
|
|
98
|
+
self.restart_node(0, extra_args=["-permitbaremultisig", "-permitbarepubkey"])
|
|
99
99
|
|
|
100
100
|
assert_equal(self.nodes[0].getrawmempool(), [])
|
|
101
101
|
|
|
@@ -132,7 +132,7 @@ class DustRelayFeeTest(BitcoinTestFramework):
|
|
|
132
132
|
else:
|
|
133
133
|
dust_parameter = f"-dustrelayfee={dustfee_btc_kvb:.8f}"
|
|
134
134
|
self.log.info(f"Test dust limit setting {dust_parameter} ({dustfee_sat_kvb} sat/kvB)...")
|
|
135
|
-
self.restart_node(0, extra_args=[dust_parameter, "-permitbaremultisig"])
|
|
135
|
+
self.restart_node(0, extra_args=[dust_parameter, "-permitbaremultisig", "-permitbarepubkey"])
|
|
136
136
|
|
|
137
137
|
for output_script, description in output_scripts:
|
|
138
138
|
self.test_dust_output(self.nodes[0], dustfee_btc_kvb, output_script, description)
|