From 5ab48378ccd98791507b18170a6e1a81b608364d Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 30 Jan 2016 02:34:35 -0800 Subject: [PATCH] fix addTX. --- lib/bcoin/pool.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/bcoin/pool.js b/lib/bcoin/pool.js index 138ff6de..b178e108 100644 --- a/lib/bcoin/pool.js +++ b/lib/bcoin/pool.js @@ -878,13 +878,16 @@ Pool.prototype._addTX = function(hash, state) { } if (this.tx.state[hash] == null) { - if (state == null) - state = 1; this.tx.state[hash] = state; this.tx.count++; return true; } + if (this.tx.state[hash] < state) { + this.tx.state[hash] = state; + return true; + } + return false; };