From 67dc96ff5dc02e671e65da21590e1d4079acf740 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 11 May 2016 19:26:34 -0700 Subject: [PATCH] remove seenTX. --- lib/bcoin/mempool.js | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/lib/bcoin/mempool.js b/lib/bcoin/mempool.js index 9bc7b1d4..9ae27020 100644 --- a/lib/bcoin/mempool.js +++ b/lib/bcoin/mempool.js @@ -1196,38 +1196,6 @@ Mempool.prototype.removeOrphan = function removeOrphan(tx, callback) { }); }; -/** - * Test a transaction hash to see if it has been seen as - * an orphan, in the mempool, or in the blockchain. This - * is the closest thing to a function - * named "DoesThisTransactionExist()". - * @param {TX} tx - * @param {Function} callback - Returns [Error, Boolean]. - */ - -Mempool.prototype.seenTX = function seenTX(tx, callback) { - var self = this; - var hash = tx.hash('hex'); - - return this.hasOrphan(hash, function(err, result) { - if (err) - return callback(err); - - if (result) - return callback(null, true); - - return self.hasTX(hash, function(err, result) { - if (err) - return callback(err); - - if (result) - return callback(null, true); - - return self.chain.db.hasTX(hash, callback); - }); - }); -}; - /** * Fill transaction with all unspent _and spent_ * coins. Similar to {@link Mempool#fillHistory}