From e716f4eb006aff04a5315ed6df3f6a7414b88d90 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sat, 10 May 2014 19:50:25 +0400 Subject: [PATCH] tx-pool: fix `ps` check --- lib/bcoin/tx-pool.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bcoin/tx-pool.js b/lib/bcoin/tx-pool.js index 112ecb4c..e7f3af87 100644 --- a/lib/bcoin/tx-pool.js +++ b/lib/bcoin/tx-pool.js @@ -49,8 +49,8 @@ TXPool.prototype.add = function add(tx, noWrite) { var hash = tx.hash('hex'); // Ignore stale pending transactions - if (tx.ps + 2 * 24 * 3600 < +new Date / 1000) { - this._removeTX(orphan.tx); + if (tx.ts === 0 && tx.ps + 2 * 24 * 3600 < +new Date / 1000) { + this._removeTX(tx); return; }