Skip to content

Commit 0b26e7c

Browse files
committed
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.
1 parent 31764c3 commit 0b26e7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/script/descriptor.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ class DescriptorImpl : public Descriptor
612612
return AddChecksum(ret);
613613
}
614614

615-
bool ToPrivateString(const SigningProvider& arg, std::string& out) const final
615+
bool ToPrivateString(const SigningProvider& arg, std::string& out) const override
616616
{
617617
bool ret = ToStringHelper(&arg, out, StringType::PRIVATE);
618618
out = AddChecksum(out);
@@ -698,6 +698,7 @@ class AddressDescriptor final : public DescriptorImpl
698698
return OutputTypeFromDestination(m_destination);
699699
}
700700
bool IsSingleType() const final { return true; }
701+
bool ToPrivateString(const SigningProvider& arg, std::string& out) const final { return false; }
701702
};
702703

703704
/** A parsed raw(H) descriptor. */
@@ -718,6 +719,7 @@ class RawDescriptor final : public DescriptorImpl
718719
return OutputTypeFromDestination(dest);
719720
}
720721
bool IsSingleType() const final { return true; }
722+
bool ToPrivateString(const SigningProvider& arg, std::string& out) const final { return false; }
721723
};
722724

723725
/** A parsed pk(P) descriptor. */

0 commit comments

Comments
 (0)