Skip to content

Commit ee5a036

Browse files
committed
test: ensure acceptstalefeeestimates is supported only on regtest chain
1 parent 22d5d4b commit ee5a036

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/functional/feature_config_args.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,14 @@ def test_ignored_default_conf(self):
371371
f'is being used instead.') + r"[\s\S]*", env=env, match=ErrorMatch.FULL_REGEX)
372372
node.args = node_args
373373

374+
def test_acceptstalefeeestimates_arg_support(self):
375+
self.log.info("Test -acceptstalefeeestimates option support")
376+
conf_file = self.nodes[0].datadir_path / "bitcoin.conf"
377+
for chain, chain_name in {("main", ""), ("test", "testnet3"), ("signet", "signet")}:
378+
util.write_config(conf_file, n=0, chain=chain_name, extra_config='acceptstalefeeestimates=1\n')
379+
self.nodes[0].assert_start_raises_init_error(expected_msg=f'Error: acceptstalefeeestimates is not supported on {chain} chain.')
380+
util.write_config(conf_file, n=0, chain="regtest") # Reset to regtest
381+
374382
def run_test(self):
375383
self.test_log_buffer()
376384
self.test_args_log()
@@ -383,6 +391,7 @@ def run_test(self):
383391
self.test_invalid_command_line_options()
384392
self.test_ignored_conf()
385393
self.test_ignored_default_conf()
394+
self.test_acceptstalefeeestimates_arg_support()
386395

387396
# Remove the -datadir argument so it doesn't override the config file
388397
self.nodes[0].args = [arg for arg in self.nodes[0].args if not arg.startswith("-datadir")]

0 commit comments

Comments
 (0)