Skip to content

Commit dc1e8a4

Browse files
MacroFakevijaydasmp
authored andcommitted
Merge bitcoin#25535: test: pass dustrelayfee=0 option for tests using dust (instead of acceptnonstdtxn=1)
1770be7 test: pass `dustrelayfee=0` option for tests using dust (instead of `acceptnonstdtxn=1`) (Sebastian Falbesoner) Pull request description: 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. Note that for the test `feature_dbcrash.py`, the UTXO creation at the start of the test has to be split up to several txs to not exceed the tx standard size limit of 100k vbytes https://github.com/bitcoin/bitcoin/blob/4129c1375430dbfe8dd414868c43fceb3d091fc3/src/policy/policy.h#L26-L27 ACKs for top commit: MarcoFalke: review ACK 1770be7 Tree-SHA512: 5cb852a92883a7443ab7dc15b48efa76b5d1424b6b0da1fa6b075fbe9a83522e3ff60382d36c08d4b07143ed898c115614582474e37837332caaee73b0db0e47
1 parent 037ee56 commit dc1e8a4

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
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, will mine full blocks
65-
# and non-standard txs (e.g. txs with "dust" outputs)
66-
self.node3_args = ["-acceptnonstdtxn"]
65+
# and txs with "dust" outputs
66+
self.node3_args = ["-dustrelayfee=0"]
6767
self.extra_args = [self.node0_args, self.node1_args, self.node2_args, self.node3_args]
6868

6969
def skip_test_if_missing_module(self):
@@ -217,7 +217,9 @@ def run_test(self):
217217

218218
# Start by creating a lot of utxos on node3
219219
initial_height = self.nodes[3].getblockcount()
220-
utxo_list = create_confirmed_utxos(self, self.nodes[3].getnetworkinfo()['relayfee'], self.nodes[3], 5000, sync_fun=self.no_op)
220+
utxo_list = []
221+
for _ in range(5):
222+
utxo_list.extend(create_confirmed_utxos(self, self.nodes[3].getnetworkinfo()['relayfee'], self.nodes[3], 1000, sync_fun=self.no_op))
221223
self.log.info(f"Prepped {len(utxo_list)} utxo entries")
222224

223225
# Sync these blocks with the other nodes

test/functional/wallet_basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ def set_test_params(self):
2727
self.num_nodes = 4
2828
if self.options.descriptors:
2929
self.extra_args = [[
30-
"-acceptnonstdtxn=1", "-whitelist=noban@127.0.0.1"
30+
"-dustrelayfee=0", "-whitelist=noban@127.0.0.1"
3131
] for i in range(self.num_nodes)]
3232
else:
3333
self.extra_args = [[
34-
"-acceptnonstdtxn=1", "-whitelist=noban@127.0.0.1",
34+
"-dustrelayfee=0", "-whitelist=noban@127.0.0.1",
3535
'-usehd={:d}'.format(i%2==0)
3636
] for i in range(self.num_nodes)]
3737
self.setup_clean_chain = True

0 commit comments

Comments
 (0)