Merge 5bf65ec66e into merged_master (Bitcoin PR bitcoin/bitcoin#22558)

This commit is contained in:
Byron Hambly 2024-09-19 13:24:19 +02:00
commit 2d07ef8fc1
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697
17 changed files with 710 additions and 31 deletions

View file

@ -2188,6 +2188,19 @@ TransactionError DescriptorScriptPubKeyMan::FillPSBT(PartiallySignedTransaction&
*keys = Merge(*keys, *pk_keys);
}
}
for (const auto& pk_pair : input.m_tap_bip32_paths) {
const XOnlyPubKey& pubkey = pk_pair.first;
for (unsigned char prefix : {0x02, 0x03}) {
unsigned char b[33] = {prefix};
std::copy(pubkey.begin(), pubkey.end(), b + 1);
CPubKey fullpubkey;
fullpubkey.Set(b, b + 33);
std::unique_ptr<FlatSigningProvider> pk_keys = GetSigningProvider(fullpubkey);
if (pk_keys) {
*keys = Merge(*keys, *pk_keys);
}
}
}
}
SignPSBTInput(HidingSigningProvider(keys.get(), !sign, !bip32derivs), psbtx, i, &txdata, sighash_type, nullptr, finalize);