Format CValidationState properly in all cases

FormatStateMessage does not properly handle the case where
CValidationState::IsValid() returns true. Use "Valid" for the state in
this case.
pull/16688/head
Jeffrey Czyz 5 years ago
parent 428ac70095
commit 72f3227c83

@ -11,6 +11,10 @@
/** Convert ValidationState to a human-readable message for logging */
std::string FormatStateMessage(const ValidationState &state)
{
if (state.IsValid()) {
return "Valid";
}
return strprintf("%s%s",
state.GetRejectReason(),
state.GetDebugMessage().empty() ? "" : ", "+state.GetDebugMessage());

Loading…
Cancel
Save