mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-10 07:35:40 +01:00
Merge bitcoin/bitcoin#22650: Remove -deprecatedrpc=addresses flag and corresponding code/logic
43cd6b8af9doc: add release notes for removal of the -deprecatedrpc=addresses flag (Michael Dietz)2b1fdc2c6crefactor: minor styling, prefer snake case and same line if (Michael Dietz)d64deac7b8refactor: share logic between ScriptPubKeyToUniv and ScriptToUniv (Michael Dietz)8721638daarpc: remove deprecated addresses and reqSigs from rpc outputs (Michael Dietz) Pull request description: Resolves #21797 now that we've branched-off to v23 ("addresses" and "reqSigs" deprecated) "ExtractDestinations" should be removed. `-deprecatedrpc=addresses` was initially added in this PR #20286 (which resolved the original issue #20102). Some chunks of code and logic are no longer used/necessary with the removal of this, and therefore some minor refactoring is done in this PR as well (separated commits) ACKs for top commit: MarcoFalke: re-ACK43cd6b8af9🐉 meshcollider: Code review ACK43cd6b8af9jonatack: ACK43cd6b8af9per `git range-diffa9d0cec92dc5e9 43cd6b8`, also rebased to latest master, debug built + quick re-review of each commit to bring back context, and ran tests locally at the final commit Tree-SHA512: fba83495e396d3c06f0dcf49292f14f4aa6b68fa758f0503941fade1a6e7271cda8378e2734af1faea550d1b43c85a36c52ebcc9dec0732936f9233b4b97901c
This commit is contained in:
@@ -1256,11 +1256,8 @@ static RPCHelpMan gettxout()
|
||||
{RPCResult::Type::OBJ, "scriptPubKey", "", {
|
||||
{RPCResult::Type::STR, "asm", ""},
|
||||
{RPCResult::Type::STR_HEX, "hex", ""},
|
||||
{RPCResult::Type::NUM, "reqSigs", /* optional */ true, "(DEPRECATED, returned only if config option -deprecatedrpc=addresses is passed) Number of required signatures"},
|
||||
{RPCResult::Type::STR, "type", "The type, eg pubkeyhash"},
|
||||
{RPCResult::Type::STR, "address", /* optional */ true, "bitcoin address (only if a well-defined address exists)"},
|
||||
{RPCResult::Type::ARR, "addresses", /* optional */ true, "(DEPRECATED, returned only if config option -deprecatedrpc=addresses is passed) Array of bitcoin addresses",
|
||||
{{RPCResult::Type::STR, "address", "bitcoin address"}}},
|
||||
{RPCResult::Type::STR, "address", /* optional */ true, "The Bitcoin address (only if a well-defined address exists)"},
|
||||
}},
|
||||
{RPCResult::Type::BOOL, "coinbase", "Coinbase or not"},
|
||||
}},
|
||||
@@ -1933,16 +1930,6 @@ void CalculatePercentilesByWeight(CAmount result[NUM_GETBLOCKSTATS_PERCENTILES],
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex)
|
||||
{
|
||||
ScriptPubKeyToUniv(scriptPubKey, out, fIncludeHex, IsDeprecatedRPCEnabled("addresses"));
|
||||
}
|
||||
|
||||
void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry, bool include_hex, int serialize_flags, const CTxUndo* txundo)
|
||||
{
|
||||
TxToUniv(tx, hashBlock, IsDeprecatedRPCEnabled("addresses"), entry, include_hex, serialize_flags, txundo);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static inline bool SetHasKeys(const std::set<T>& set) {return false;}
|
||||
template<typename T, typename Tk, typename... Args>
|
||||
|
||||
Reference in New Issue
Block a user