mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 10:42:13 +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:
@@ -220,7 +220,6 @@ bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet)
|
||||
return true;
|
||||
}
|
||||
case TxoutType::MULTISIG:
|
||||
// Multisig txns have more than one address...
|
||||
case TxoutType::NULL_DATA:
|
||||
case TxoutType::NONSTANDARD:
|
||||
return false;
|
||||
@@ -228,6 +227,7 @@ bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet)
|
||||
assert(false);
|
||||
}
|
||||
|
||||
// TODO: from v23 ("addresses" and "reqSigs" deprecated) "ExtractDestinations" should be removed
|
||||
bool ExtractDestinations(const CScript& scriptPubKey, TxoutType& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet)
|
||||
{
|
||||
addressRet.clear();
|
||||
|
||||
@@ -247,6 +247,8 @@ bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet)
|
||||
* Note: this function confuses destinations (a subset of CScripts that are
|
||||
* encodable as an address) with key identifiers (of keys involved in a
|
||||
* CScript), and its use should be phased out.
|
||||
*
|
||||
* TODO: from v23 ("addresses" and "reqSigs" deprecated) "ExtractDestinations" should be removed
|
||||
*/
|
||||
bool ExtractDestinations(const CScript& scriptPubKey, TxoutType& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user