aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorbrunoerg <brunoely.gc@gmail.com>2022-05-25 15:17:12 -0300
committerfanquake <fanquake@gmail.com>2022-06-09 12:05:17 +0100
commit32fa522a80c87231dc6194b982f64440c801b7d4 (patch)
tree184220c9352b24a76b59e10c0bf094f62bdf1d2e /test
parent7658055c4e97b998639b67fd6dca386c1cdc748a (diff)
downloadbitcoin-32fa522a80c87231dc6194b982f64440c801b7d4.tar.xz
test: ensure createmultisig and addmultisigaddress are not returning any warning for expected cases
Github-Pull: #25220 Rebased-From: 3a9b9bb38e653c8ff7220b9af6e337a90c2c22dc
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/rpc_createmultisig.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/functional/rpc_createmultisig.py b/test/functional/rpc_createmultisig.py
index 1a3d14100f..85a2508392 100755
--- a/test/functional/rpc_createmultisig.py
+++ b/test/functional/rpc_createmultisig.py
@@ -80,14 +80,16 @@ class RpcCreateMultiSigTest(BitcoinTestFramework):
assert 'warnings' not in result
# Generate addresses with the segwit types. These should all make legacy addresses
+ err_msg = ["Unable to make chosen address type, please ensure no uncompressed public keys are present."]
+
for addr_type in ['bech32', 'p2sh-segwit']:
- result = wmulti0.createmultisig(2, keys, addr_type)
+ result = wmulti0.createmultisig(nrequired=2, keys=keys, address_type=addr_type)
assert_equal(legacy_addr, result['address'])
- assert_equal(result['warnings'], ["Unable to make chosen address type, please ensure no uncompressed public keys are present."])
+ assert_equal(result['warnings'], err_msg)
- result = wmulti0.addmultisigaddress(2, keys, '', addr_type)
+ result = wmulti0.addmultisigaddress(nrequired=2, keys=keys, address_type=addr_type)
assert_equal(legacy_addr, result['address'])
- assert_equal(result['warnings'], ["Unable to make chosen address type, please ensure no uncompressed public keys are present."])
+ assert_equal(result['warnings'], err_msg)
self.log.info('Testing sortedmulti descriptors with BIP 67 test vectors')
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data/rpc_bip67.json'), encoding='utf-8') as f:
@@ -158,6 +160,7 @@ class RpcCreateMultiSigTest(BitcoinTestFramework):
desc = descsum_create(desc)
msig = node2.createmultisig(self.nsigs, self.pub, self.output_type)
+ assert 'warnings' not in msig
madd = msig["address"]
mredeem = msig["redeemScript"]
assert_equal(desc, msig['descriptor'])