Skip to content

Commit 1770be7

Browse files
committed
test: pass dustrelayfee=0 option for tests using dust (instead of acceptnonstdtxn=1)
By specifying the `dustrelayfee=0` option instead of the more generic `acceptnonstdtxn=1`, we can be more specific about what part of the transaction is non-standard and can be sure that all other aspects follow the standard policy.
1 parent 4129c13 commit 1770be7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test/functional/feature_dbcrash.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def set_test_params(self):
6262
self.node2_args = ["-dbcrashratio=24", "-dbcache=16"] + self.base_args
6363

6464
# Node3 is a normal node with default args, except will mine full blocks
65-
# and non-standard txs (e.g. txs with "dust" outputs)
66-
self.node3_args = ["-blockmaxweight=4000000", "-acceptnonstdtxn"]
65+
# and txs with "dust" outputs
66+
self.node3_args = ["-blockmaxweight=4000000", "-dustrelayfee=0"]
6767
self.extra_args = [self.node0_args, self.node1_args, self.node2_args, self.node3_args]
6868

6969
def setup_network(self):
@@ -211,7 +211,9 @@ def run_test(self):
211211
self.crashed_on_restart = 0 # Track count of crashes during recovery
212212

213213
# Start by creating a lot of utxos on node3
214-
utxo_list = self.wallet.send_self_transfer_multi(from_node=self.nodes[3], num_outputs=5000)['new_utxos']
214+
utxo_list = []
215+
for _ in range(5):
216+
utxo_list.extend(self.wallet.send_self_transfer_multi(from_node=self.nodes[3], num_outputs=1000)['new_utxos'])
215217
self.generate(self.nodes[3], 1, sync_fun=self.no_op)
216218
assert_equal(len(self.nodes[3].getrawmempool()), 0)
217219
self.log.info(f"Prepped {len(utxo_list)} utxo entries")

test/functional/wallet_basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class WalletTest(BitcoinTestFramework):
2525
def set_test_params(self):
2626
self.num_nodes = 4
2727
self.extra_args = [[
28-
"-acceptnonstdtxn=1", "-walletrejectlongchains=0"
28+
"-dustrelayfee=0", "-walletrejectlongchains=0"
2929
]] * self.num_nodes
3030
self.setup_clean_chain = True
3131
self.supports_cli = False

0 commit comments

Comments
 (0)