From f523c6bec005b2c999651787d029dee0fe719eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Barbosa?= Date: Wed, 17 Jan 2018 23:30:56 +0000 Subject: [PATCH] [qa] Use address type in addmultisigaddress to avoid addwitnessaddress --- test/functional/nulldummy.py | 2 +- test/functional/segwit.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/functional/nulldummy.py b/test/functional/nulldummy.py index fac620bc8..e4f413cc2 100755 --- a/test/functional/nulldummy.py +++ b/test/functional/nulldummy.py @@ -48,7 +48,7 @@ class NULLDUMMYTest(BitcoinTestFramework): self.address = self.nodes[0].getnewaddress() self.ms_address = self.nodes[0].addmultisigaddress(1,[self.address])['address'] self.wit_address = self.nodes[0].addwitnessaddress(self.address) - self.wit_ms_address = self.nodes[0].addwitnessaddress(self.ms_address) + self.wit_ms_address = self.nodes[0].addmultisigaddress(1, [self.address], '', 'p2sh-segwit')['address'] network_thread_start() self.coinbase_blocks = self.nodes[0].generate(2) # Block 2 diff --git a/test/functional/segwit.py b/test/functional/segwit.py index 931ebdea3..ba6373fa3 100755 --- a/test/functional/segwit.py +++ b/test/functional/segwit.py @@ -95,12 +95,11 @@ class SegWitTest(BitcoinTestFramework): for i in range(3): newaddress = self.nodes[i].getnewaddress() self.pubkey.append(self.nodes[i].validateaddress(newaddress)["pubkey"]) - multiaddress = self.nodes[i].addmultisigaddress(1, [self.pubkey[-1]])['address'] multiscript = CScript([OP_1, hex_str_to_bytes(self.pubkey[-1]), OP_1, OP_CHECKMULTISIG]) p2sh_addr = self.nodes[i].addwitnessaddress(newaddress) bip173_addr = self.nodes[i].addwitnessaddress(newaddress, False) - p2sh_ms_addr = self.nodes[i].addwitnessaddress(multiaddress) - bip173_ms_addr = self.nodes[i].addwitnessaddress(multiaddress, False) + p2sh_ms_addr = self.nodes[i].addmultisigaddress(1, [self.pubkey[-1]], '', 'p2sh-segwit')['address'] + bip173_ms_addr = self.nodes[i].addmultisigaddress(1, [self.pubkey[-1]], '', 'bech32')['address'] assert_equal(p2sh_addr, key_to_p2sh_p2wpkh(self.pubkey[-1])) assert_equal(bip173_addr, key_to_p2wpkh(self.pubkey[-1])) assert_equal(p2sh_ms_addr, script_to_p2sh_p2wsh(multiscript))