aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2021-07-26 16:23:50 -0400
committerAndrew Chow <achow101-github@achow101.com>2022-06-27 16:47:48 -0400
commit496a1bbe5e442ffc0948f626cca1b85a46ef58db (patch)
treed9fb1857432fa2cedeb88ed1819ce653d2f9af97 /src
parent0ad21e7c558da47f50d6b39974d0d2713e829d25 (diff)
downloadbitcoin-496a1bbe5e442ffc0948f626cca1b85a46ef58db.tar.xz
taproot: Use pre-existing signatures if available
Actually use pre-existing signatures in CreateTaprootScriptSig if a signature is found for the given key and leaf hash.
Diffstat (limited to 'src')
-rw-r--r--src/script/sign.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 5cd773f6ee..12f2ec4d3a 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -150,6 +150,7 @@ static bool CreateTaprootScriptSig(const BaseSignatureCreator& creator, Signatur
auto it = sigdata.taproot_script_sigs.find(lookup_key);
if (it != sigdata.taproot_script_sigs.end()) {
sig_out = it->second;
+ return true;
}
if (creator.CreateSchnorrSig(provider, sig_out, pubkey, &leaf_hash, nullptr, sigversion)) {
sigdata.taproot_script_sigs[lookup_key] = sig_out;