mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-23 13:32:24 +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:
@@ -165,7 +165,7 @@ class RpcCreateMultiSigTest(BitcoinTestFramework):
|
||||
txid = node0.sendtoaddress(madd, 40)
|
||||
|
||||
tx = node0.getrawtransaction(txid, True)
|
||||
vout = [v["n"] for v in tx["vout"] if madd in v["scriptPubKey"].get("addresses", [])]
|
||||
vout = [v["n"] for v in tx["vout"] if madd == v["scriptPubKey"]["address"]]
|
||||
assert len(vout) == 1
|
||||
vout = vout[0]
|
||||
scriptPubKey = tx["vout"][vout]["scriptPubKey"]["hex"]
|
||||
|
Reference in New Issue
Block a user