From 68ef954c4c59802a6810a462eaa8dd61728ba820 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Mon, 12 Feb 2024 17:33:44 -0500 Subject: [PATCH] wallet: Keep secnonces in DescriptorScriptPubKeyMan --- src/wallet/scriptpubkeyman.cpp | 4 ++++ src/wallet/scriptpubkeyman.h | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index 730667dbdf4..ff18265d70b 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -1256,6 +1256,10 @@ std::unique_ptr DescriptorScriptPubKeyMan::GetSigningProvid FlatSigningProvider master_provider; master_provider.keys = GetKeys(); m_wallet_descriptor.descriptor->ExpandPrivate(index, master_provider, *out_keys); + + // Always include musig_secnonces as this descriptor may have a participant private key + // but not a musig() descriptor + out_keys->musig2_secnonces = &m_musig2_secnonces; } return out_keys; diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index c6f6e37f2b9..ee2acdfbd8f 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include