Skip to content

Commit

Permalink
tests: ensure functional tests set permitbaremultisig=1 when needed
Browse files Browse the repository at this point in the history
The mempool_dust and mempool_sigoplimits functional tests both use bare
multisig txs, so ensure they're allowed by policy.
  • Loading branch information
ajtowns committed Dec 15, 2023
1 parent 5cfb107 commit eeaf602
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/functional/mempool_dust.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
class DustRelayFeeTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
self.extra_args = [['-permitbaremultisig']]

def test_dust_output(self, node: TestNode, dust_relay_fee: Decimal,
output_script: CScript, type_desc: str) -> None:
Expand Down Expand Up @@ -101,7 +102,7 @@ def run_test(self):
else:
dust_parameter = f"-dustrelayfee={dustfee_btc_kvb:.8f}"
self.log.info(f"Test dust limit setting {dust_parameter} ({dustfee_sat_kvb} sat/kvB)...")
self.restart_node(0, extra_args=[dust_parameter])
self.restart_node(0, extra_args=[dust_parameter, "-permitbaremultisig"])

for output_script, description in output_scripts:
self.test_dust_output(self.nodes[0], dustfee_btc_kvb, output_script, description)
Expand Down
2 changes: 1 addition & 1 deletion test/functional/mempool_sigoplimit.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_sigops_package(self):
self.log.info("Test a overly-large sigops-vbyte hits package limits")
# Make a 2-transaction package which fails vbyte checks even though
# separately they would work.
self.restart_node(0, extra_args=["-bytespersigop=5000"] + self.extra_args[0])
self.restart_node(0, extra_args=["-bytespersigop=5000","-permitbaremultisig=1"] + self.extra_args[0])

def create_bare_multisig_tx(utxo_to_spend=None):
_, pubkey = generate_keypair()
Expand Down

0 comments on commit eeaf602

Please sign in to comment.