From c1765f03d1405d2110d456cc59bcf260b1ab60de Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Mon, 2 May 2016 21:14:30 +0300 Subject: [PATCH] Remove dead code, we aren't going to support transaction replacement feature any time soon. --- src/main.cpp | 18 +----------------- 1 files changed, 1 insertions(+), 17 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 91338b5..f2cc876 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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; } } -- 1.7.1