mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
parsing external signer master fingerprint string as bytes instead of caring for lower/upper case in ExternalSigner::SignTransaction
This commit is contained in:
parent
74d9f4bd95
commit
2a22f034ca
1 changed files with 3 additions and 2 deletions
|
@ -74,11 +74,12 @@ bool ExternalSigner::SignTransaction(PartiallySignedTransaction& psbtx, std::str
|
|||
// Serialize the PSBT
|
||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ssTx << psbtx;
|
||||
|
||||
// parse ExternalSigner master fingerprint
|
||||
std::vector<unsigned char> parsed_m_fingerprint = ParseHex(m_fingerprint);
|
||||
// Check if signer fingerprint matches any input master key fingerprint
|
||||
auto matches_signer_fingerprint = [&](const PSBTInput& input) {
|
||||
for (const auto& entry : input.hd_keypaths) {
|
||||
if (m_fingerprint == strprintf("%08x", ReadBE32(entry.second.fingerprint))) return true;
|
||||
if (parsed_m_fingerprint == MakeUCharSpan(entry.second.fingerprint)) return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue