From 2a22f034ca3298c9f86d1edd4283a0bea18dfbbe Mon Sep 17 00:00:00 2001 From: avirgovi Date: Thu, 28 Apr 2022 19:52:51 +0200 Subject: [PATCH] parsing external signer master fingerprint string as bytes instead of caring for lower/upper case in ExternalSigner::SignTransaction --- src/external_signer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/external_signer.cpp b/src/external_signer.cpp index 75070899c6..d125fe479b 100644 --- a/src/external_signer.cpp +++ b/src/external_signer.cpp @@ -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 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; };