From 32e94429d3e115136fe0360482e94f789ad01cdf Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 3 Apr 2016 02:13:36 -0700 Subject: [PATCH] fix getLocks and wallet zapping. --- lib/bcoin/chain.js | 2 +- lib/bcoin/txdb.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/bcoin/chain.js b/lib/bcoin/chain.js index 62f52001..d6751e6a 100644 --- a/lib/bcoin/chain.js +++ b/lib/bcoin/chain.js @@ -2036,7 +2036,7 @@ Chain.prototype.getLocks = function getLocks(tx, flags, entry, callback) { return next(); coinHeight = input.coin.height === -1 - ? self.chain.tip + 1 + ? self.height + 1 : input.coin.height; if ((input.sequence & typeFlag) === 0) { diff --git a/lib/bcoin/txdb.js b/lib/bcoin/txdb.js index d6ff14bd..7acec30f 100644 --- a/lib/bcoin/txdb.js +++ b/lib/bcoin/txdb.js @@ -1794,6 +1794,8 @@ TXPool.prototype.zap = function zap(address, now, age, callback, force) { return callback(err); utils.forEachSerial(txs, function(tx, next) { + if (tx.ts !== 0) + return next(); self.lazyRemove(tx, next); }, callback); });