diff --git a/src/util/validation.cpp b/src/util/validation.cpp index bd52f577516..603db51d45a 100644 --- a/src/util/validation.cpp +++ b/src/util/validation.cpp @@ -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());