mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-08 14:42:28 +02:00
rpc: deprecate addresses
and reqSigs
from rpc outputs
1) add a new sane "address" field (for outputs that have an identifiable address, which doesn't include bare multisig) 2) with -deprecatedrpc: leave "reqSigs" and "addresses" intact (with all weird/wrong behavior they have now) 3) without -deprecatedrpc: drop "reqSigs" and "addresses" entirely, always.
This commit is contained in:
@@ -600,7 +600,7 @@ class WalletTest(BitcoinTestFramework):
|
||||
destination = self.nodes[1].getnewaddress()
|
||||
txid = self.nodes[0].sendtoaddress(destination, 0.123)
|
||||
tx = self.nodes[0].decoderawtransaction(self.nodes[0].gettransaction(txid)['hex'])
|
||||
output_addresses = [vout['scriptPubKey']['addresses'][0] for vout in tx["vout"]]
|
||||
output_addresses = [vout['scriptPubKey']['address'] for vout in tx["vout"]]
|
||||
assert len(output_addresses) > 1
|
||||
for address in output_addresses:
|
||||
ischange = self.nodes[0].getaddressinfo(address)['ischange']
|
||||
|
Reference in New Issue
Block a user