From: CryptoManiac Date: Mon, 2 May 2016 22:15:05 +0000 (+0300) Subject: Remove dead code. X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=d3f0a71ee8fde6330ab73d1de851e572cc636583 Remove dead code. --- diff --git a/src/main.cpp b/src/main.cpp index 13a958f..87e216e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -116,13 +116,6 @@ bool static IsFromMe(CTransaction& tx) return false; } -// erases transaction with the given hash from all wallets -void static EraseFromWallets(uint256 hash) -{ - for(CWallet* pwallet : setpwalletRegistered) - pwallet->EraseFromWallet(hash); -} - // make sure all wallets know about the given transaction, in the given block void SyncWithWallets(const CTransaction& tx, const CBlock* pblock, bool fUpdate, bool fConnect) { @@ -638,7 +631,6 @@ bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs, return false; // Check for conflicts with in-memory transactions - CTransaction* ptxOld = NULL; for (unsigned int i = 0; i < tx.vin.size(); i++) { auto outpoint = tx.vin[i].prevout; @@ -717,19 +709,9 @@ bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs, // Store transaction in memory { LOCK(cs); - if (ptxOld) - { - printf("CTxMemPool::accept() : replacing tx %s with new version\n", ptxOld->GetHash().ToString().c_str()); - remove(*ptxOld); - } addUnchecked(hash, tx); } - ///// are we sure this is ok when loading transactions or restoring block txes - // If updated, erase old tx from wallet - if (ptxOld) - EraseFromWallets(ptxOld->GetHash()); - printf("CTxMemPool::accept() : accepted %s (poolsz %" PRIszu ")\n", hash.ToString().substr(0,10).c_str(), mapTx.size());