From f699b4f12f6d8d8bddb1b4390e731cbfb86e0ec0 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 2 Nov 2016 06:33:34 -0700 Subject: [PATCH] walletdb: lint. --- lib/wallet/browser.js | 2 +- lib/wallet/walletdb.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/wallet/browser.js b/lib/wallet/browser.js index bcf3b9da..cfef4706 100644 --- a/lib/wallet/browser.js +++ b/lib/wallet/browser.js @@ -60,7 +60,7 @@ layout.walletdb = { bb: function bb(key) { return +key.slice(1); }, - o: function o(hash) { + o: function o(hash, index) { return 'o' + hash + pad32(index); }, oo: function oo(key) { diff --git a/lib/wallet/walletdb.js b/lib/wallet/walletdb.js index 5b9f9166..b4e9da84 100644 --- a/lib/wallet/walletdb.js +++ b/lib/wallet/walletdb.js @@ -1648,7 +1648,7 @@ WalletDB.prototype.resetState = co(function* resetState(tip) { WalletDB.prototype.syncState = co(function* syncState(tip) { var batch = this.db.batch(); var state = this.state.clone(); - var i, state, height, blocks; + var i, height, blocks; if (tip.height < state.height) { // Hashes ahead of our new tip @@ -1852,16 +1852,16 @@ WalletDB.prototype.rollback = co(function* rollback(height) { /** * Revert TXDB to an older state. - * @param {Number} height + * @param {Number} target * @returns {Promise} */ -WalletDB.prototype.revert = co(function* revert(height) { +WalletDB.prototype.revert = co(function* revert(target) { var total = 0; var i, iter, item, height, block, tx; iter = this.db.iterator({ - gte: layout.b(height + 1), + gte: layout.b(target + 1), lte: layout.b(0xffffffff), reverse: true, values: true