test: Force named args for RPCOverloadWrapper optional args
This can avoid bugs and makes the test code easier to read, because the order of positional args does not have to be known or assumed.
This commit is contained in:
5 files changed
+16
-16
No files matched your search
@@ -111,7 +111,7 @@ class PSBTTest(BitcoinTestFramework):
|
||||
# Mine a transaction that credits the offline address
|
||||
offline_addr = offline_node.getnewaddress(address_type="bech32m")
|
||||
online_addr = w2.getnewaddress(address_type="bech32m")
|
||||
wonline.importaddress(offline_addr, "", False)
|
||||
wonline.importaddress(offline_addr, label="", rescan=False)
|
||||
mining_wallet = mining_node.get_wallet_rpc(self.default_wallet_name)
|
||||
mining_wallet.sendtoaddress(address=offline_addr, amount=1.0)
|
||||
self.generate(mining_node, nblocks=1, sync_fun=lambda: self.sync_all([online_node, mining_node]))
|
||||
@@ -312,9 +312,9 @@ class PSBTTest(BitcoinTestFramework):
|
||||
wmulti = self.nodes[2].get_wallet_rpc('wmulti')
|
||||
|
||||
# Create all the addresses
|
||||
p2sh = wmulti.addmultisigaddress(2, [pubkey0, pubkey1, pubkey2], "", "legacy")['address']
|
||||
p2wsh = wmulti.addmultisigaddress(2, [pubkey0, pubkey1, pubkey2], "", "bech32")['address']
|
||||
p2sh_p2wsh = wmulti.addmultisigaddress(2, [pubkey0, pubkey1, pubkey2], "", "p2sh-segwit")['address']
|
||||
p2sh = wmulti.addmultisigaddress(2, [pubkey0, pubkey1, pubkey2], label="", address_type="legacy")["address"]
|
||||
p2wsh = wmulti.addmultisigaddress(2, [pubkey0, pubkey1, pubkey2], label="", address_type="bech32")["address"]
|
||||
p2sh_p2wsh = wmulti.addmultisigaddress(2, [pubkey0, pubkey1, pubkey2], label="", address_type="p2sh-segwit")["address"]
|
||||
p2wpkh = self.nodes[1].getnewaddress("", "bech32")
|
||||
p2pkh = self.nodes[1].getnewaddress("", "legacy")
|
||||
p2sh_p2wpkh = self.nodes[1].getnewaddress("", "p2sh-segwit")
|
||||
|
||||
Reference in new issue
Block a user