From a788f151b15207308af426881e21f384de9e3933 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 11 Feb 2016 02:56:07 -0800 Subject: [PATCH] increment depths on sync. --- lib/bcoin/wallet.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bcoin/wallet.js b/lib/bcoin/wallet.js index aa94120a..5081ed16 100644 --- a/lib/bcoin/wallet.js +++ b/lib/bcoin/wallet.js @@ -648,10 +648,10 @@ Wallet.prototype.getOutputDepth = function getOutputDepth(tx) { Wallet.prototype.syncOutputDepth = function syncOutputDepth(tx) { var depth = this.getOutputDepth(tx); - if (depth.change > this.changeDepth) - this.setChangeDepth(depth.change); - if (depth.receive > this.receiveDepth) - this.setReceiveDepth(depth.receive); + if (depth.change >= this.changeDepth) + this.setChangeDepth(depth.change + 1); + if (depth.receive >= this.receiveDepth) + this.setReceiveDepth(depth.receive + 1); }; Wallet.prototype.scriptInputs = function scriptInputs(tx, index) {