Remove dead code, we aren't going to support transaction replacement feature any...
authorCryptoManiac <balthazar@yandex.ru>
Mon, 2 May 2016 18:14:30 +0000 (21:14 +0300)
committerCryptoManiac <balthazar@yandex.ru>
Mon, 2 May 2016 18:14:30 +0000 (21:14 +0300)
src/main.cpp

index 91338b5..f2cc876 100644 (file)
@@ -644,24 +644,8 @@ bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs,
         auto outpoint = tx.vin[i].prevout;
         if (mapNextTx.count(outpoint))
         {
-            // Disable replacement feature for now
+            // Replacement feature isn't supported by Novacoin.
             return false;
-
-            // Allow replacing with a newer version of the same transaction
-            if (i != 0)
-                return false;
-            ptxOld = mapNextTx[outpoint].ptx;
-            if (ptxOld->IsFinal())
-                return false;
-            if (!tx.IsNewerThan(*ptxOld))
-                return false;
-            for (unsigned int i = 0; i < tx.vin.size(); i++)
-            {
-                auto outpoint = tx.vin[i].prevout;
-                if (!mapNextTx.count(outpoint) || mapNextTx[outpoint].ptx != ptxOld)
-                    return false;
-            }
-            break;
         }
     }