From 5a90774a85285830250c67e6375bf4b13095f562 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 | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index 7787e2ff6bfb0..a265a2da72d06 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -2486,6 +2486,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 d8b6c90178a61..634d8bda453e9 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include