From a8cdefe23f3a3d458a92dbb368204abb2d52c31d Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Sat, 16 Aug 2014 14:21:13 +0100 Subject: [PATCH] Added further diagnostic detail in case of transaction ID clash. --- src/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index da1f12cdc..04720f47b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1889,9 +1889,11 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C if (fEnforceBIP30) { for (unsigned int i = 0; i < block.vtx.size(); i++) { uint256 hash = block.GetTxHash(i); - if (view.HaveCoins(hash) && !view.GetCoins(hash).IsPruned()) - return state.DoS(100, error("ConnectBlock() : tried to overwrite transaction"), + if (view.HaveCoins(hash) && !view.GetCoins(hash).IsPruned()) { + std::string errorMsg = "ConnectBlock() : tried to overwrite transaction " + (hash.GetHex()); + return state.DoS(100, error(errorMsg.data()), REJECT_INVALID, "bad-txns-BIP30"); + } } }