Skip to content

Commit fa309dc

Browse files
author
MarcoFalke
committed
validation: Log FormatStateMessage on ConnectBlock error in ConnectTip
1 parent aa39ca7 commit fa309dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2448,7 +2448,7 @@ bool CChainState::ConnectTip(CValidationState& state, const CChainParams& chainp
24482448
if (!rv) {
24492449
if (state.IsInvalid())
24502450
InvalidBlockFound(pindexNew, state);
2451-
return error("ConnectTip(): ConnectBlock %s failed", pindexNew->GetBlockHash().ToString());
2451+
return error("%s: ConnectBlock %s failed, %s", __func__, pindexNew->GetBlockHash().ToString(), FormatStateMessage(state));
24522452
}
24532453
nTime3 = GetTimeMicros(); nTimeConnectTotal += nTime3 - nTime2;
24542454
LogPrint(BCLog::BENCH, " - Connect total: %.2fms [%.2fs (%.2fms/blk)]\n", (nTime3 - nTime2) * MILLI, nTimeConnectTotal * MICRO, nTimeConnectTotal * MILLI / nBlocksTotal);

0 commit comments

Comments
 (0)