From 0b26e7cdf2659fd8b54d21fd2bd749f9f3e87af8 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 27 Jul 2020 15:19:17 -0400 Subject: [PATCH] descriptors: addr() and raw() should return false for ToPrivateString They don't have any private data and they can't be nested so they should return false for ToPrivateString. --- src/script/descriptor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp index 434e106dad..0078bb2a65 100644 --- a/src/script/descriptor.cpp +++ b/src/script/descriptor.cpp @@ -612,7 +612,7 @@ public: return AddChecksum(ret); } - bool ToPrivateString(const SigningProvider& arg, std::string& out) const final + bool ToPrivateString(const SigningProvider& arg, std::string& out) const override { bool ret = ToStringHelper(&arg, out, StringType::PRIVATE); out = AddChecksum(out); @@ -698,6 +698,7 @@ public: return OutputTypeFromDestination(m_destination); } bool IsSingleType() const final { return true; } + bool ToPrivateString(const SigningProvider& arg, std::string& out) const final { return false; } }; /** A parsed raw(H) descriptor. */ @@ -718,6 +719,7 @@ public: return OutputTypeFromDestination(dest); } bool IsSingleType() const final { return true; } + bool ToPrivateString(const SigningProvider& arg, std::string& out) const final { return false; } }; /** A parsed pk(P) descriptor. */