Merge 53313c49d6 into merged_master (Bitcoin PR bitcoin/bitcoin#28246)

This commit is contained in:
Byron Hambly 2025-08-01 12:22:11 +02:00
commit 34f8d7a3c4
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697
21 changed files with 173 additions and 96 deletions

View file

@ -312,6 +312,11 @@ static RPCHelpMan deriveaddresses()
for (const CScript &script : scripts) {
CTxDestination dest;
if (!ExtractDestination(script, dest)) {
// ExtractDestination no longer returns true for P2PK since it doesn't have a corresponding address
// However combo will output P2PK and should just ignore that script
if (scripts.size() > 1 && std::get_if<PubKeyDestination>(&dest)) {
continue;
}
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Descriptor does not have a corresponding address");
}