aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2014-08-16 14:21:13 +0100
committerRoss Nicoll <[email protected]>2014-08-16 14:21:13 +0100
commita8cdefe23f3a3d458a92dbb368204abb2d52c31d (patch)
tree024398adf53a9fb2e0ffe3c9013f8898ed0acec6 /src/main.cpp
parentMerge pull request #604 from whitj00/patch-3 (diff)
downloaddiscoin-a8cdefe23f3a3d458a92dbb368204abb2d52c31d.tar.xz
discoin-a8cdefe23f3a3d458a92dbb368204abb2d52c31d.zip
Added further diagnostic detail in case of transaction ID clash.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files 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");
+ }
}
}