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.
This commit is contained in:
Andrew Chow authored and Andrew Chow committed 2022-08-29 17:30:38 -04:00
1 parent 31764c3f87
commit 0b26e7cdf2
1 file changed
+3 -1
+3 -1
View File
@@ -612,7 +612,7 @@ public:
return AddChecksum(ret); 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); bool ret = ToStringHelper(&arg, out, StringType::PRIVATE);
out = AddChecksum(out); out = AddChecksum(out);
@@ -698,6 +698,7 @@ public:
return OutputTypeFromDestination(m_destination); return OutputTypeFromDestination(m_destination);
} }
bool IsSingleType() const final { return true; } bool IsSingleType() const final { return true; }
bool ToPrivateString(const SigningProvider& arg, std::string& out) const final { return false; }
}; };
/** A parsed raw(H) descriptor. */ /** A parsed raw(H) descriptor. */
@@ -718,6 +719,7 @@ public:
return OutputTypeFromDestination(dest); return OutputTypeFromDestination(dest);
} }
bool IsSingleType() const final { return true; } bool IsSingleType() const final { return true; }
bool ToPrivateString(const SigningProvider& arg, std::string& out) const final { return false; }
}; };
/** A parsed pk(P) descriptor. */ /** A parsed pk(P) descriptor. */