aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorMichael Dietz <michael.dietz@waya.ai>2021-02-01 09:52:07 -0600
committerMichael Dietz <michael.dietz@waya.ai>2021-03-23 10:51:43 -0400
commit085b3a729952896ccd0e40c17df569f4421f5493 (patch)
treeb6cfbbd212573c4d9af93cf03c21e39abc4352b0 /src/script
parent3c87dbe95c925274f80234ad4a88beb5a05fdfff (diff)
downloadbitcoin-085b3a729952896ccd0e40c17df569f4421f5493.tar.xz
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.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/standard.cpp2
-rw-r--r--src/script/standard.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index 4d882cd1f1..700155c8d4 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -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();
diff --git a/src/script/standard.h b/src/script/standard.h
index d5d87392ad..f2bf4a8af3 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -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);