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) {