changeset 2967:0f3d6bfac087 draft

Bugfix: Remove redundant duplicate transaction check
author Luke Dashjr <luke-jr+git@utopios.org>
date Fri, 04 May 2012 19:54:24 +0000
parents 2cabaf34b929
children 04987f8907d6 0d7d0201a5af
files src/main.cpp
diffstat 1 files changed, 0 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1502,16 +1502,6 @@
     if (uniqueTx.size() != vtx.size())
         return DoS(100, error("CheckBlock() : duplicate transaction"));
 
-    // Check for duplicate txids. This is caught by ConnectInputs(),
-    // but catching it earlier avoids a potential DoS attack:
-    set<uint256> uniqueTx;
-    BOOST_FOREACH(const CTransaction& tx, vtx)
-    {
-        uniqueTx.insert(tx.GetHash());
-    }
-    if (uniqueTx.size() != vtx.size())
-        return error("CheckBlock() : duplicate transaction");
-
     // Check that it's not full of nonstandard transactions
     if (GetSigOpCount() > MAX_BLOCK_SIGOPS)
         return DoS(100, error("CheckBlock() : out-of-bounds SigOpCount"));