diff options
author | Samuel Dobson <dobsonsa68@gmail.com> | 2021-09-28 15:08:13 +1300 |
---|---|---|
committer | Samuel Dobson <dobsonsa68@gmail.com> | 2021-12-08 17:11:46 +1300 |
commit | d1a9742623e2a8f3307c84c2df6993f62617a6f6 (patch) | |
tree | ea7492b6ab42700a29dbfa78c3e4823f11b1114a /test/functional/rpc_createmultisig.py | |
parent | fa3fb46b8172597cb64ff401b27f6c799fb832d7 (diff) | |
download | bitcoin-d1a9742623e2a8f3307c84c2df6993f62617a6f6.tar.xz |
Add warnings field to createmultisig to warn about uncompressed keys
Diffstat (limited to 'test/functional/rpc_createmultisig.py')
-rwxr-xr-x | test/functional/rpc_createmultisig.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/functional/rpc_createmultisig.py b/test/functional/rpc_createmultisig.py index f56e71ae7a..fb5964595a 100755 --- a/test/functional/rpc_createmultisig.py +++ b/test/functional/rpc_createmultisig.py @@ -78,8 +78,11 @@ class RpcCreateMultiSigTest(BitcoinTestFramework): assert_equal(legacy_addr, wmulti0.addmultisigaddress(2, keys, '', 'legacy')['address']) # Generate addresses with the segwit types. These should all make legacy addresses - assert_equal(legacy_addr, wmulti0.createmultisig(2, keys, 'bech32')['address']) - assert_equal(legacy_addr, wmulti0.createmultisig(2, keys, 'p2sh-segwit')['address']) + for addr_type in ['bech32', 'p2sh-segwit']: + result = wmulti0.createmultisig(2, keys, 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(legacy_addr, wmulti0.addmultisigaddress(2, keys, '', 'bech32')['address']) assert_equal(legacy_addr, wmulti0.addmultisigaddress(2, keys, '', 'p2sh-segwit')['address']) |