From d971824dc168f30af376a584c0b478c89e415f83 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 1167b915b0a..a6223ba48bd 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -2496,6 +2496,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 a5d2d695b6a..607fbe08d43 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include