walletdb: lint.
This commit is contained in:
parent
f3055e57bf
commit
f699b4f12f
@ -60,7 +60,7 @@ layout.walletdb = {
|
|||||||
bb: function bb(key) {
|
bb: function bb(key) {
|
||||||
return +key.slice(1);
|
return +key.slice(1);
|
||||||
},
|
},
|
||||||
o: function o(hash) {
|
o: function o(hash, index) {
|
||||||
return 'o' + hash + pad32(index);
|
return 'o' + hash + pad32(index);
|
||||||
},
|
},
|
||||||
oo: function oo(key) {
|
oo: function oo(key) {
|
||||||
|
|||||||
@ -1648,7 +1648,7 @@ WalletDB.prototype.resetState = co(function* resetState(tip) {
|
|||||||
WalletDB.prototype.syncState = co(function* syncState(tip) {
|
WalletDB.prototype.syncState = co(function* syncState(tip) {
|
||||||
var batch = this.db.batch();
|
var batch = this.db.batch();
|
||||||
var state = this.state.clone();
|
var state = this.state.clone();
|
||||||
var i, state, height, blocks;
|
var i, height, blocks;
|
||||||
|
|
||||||
if (tip.height < state.height) {
|
if (tip.height < state.height) {
|
||||||
// Hashes ahead of our new tip
|
// Hashes ahead of our new tip
|
||||||
@ -1852,16 +1852,16 @@ WalletDB.prototype.rollback = co(function* rollback(height) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Revert TXDB to an older state.
|
* Revert TXDB to an older state.
|
||||||
* @param {Number} height
|
* @param {Number} target
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
WalletDB.prototype.revert = co(function* revert(height) {
|
WalletDB.prototype.revert = co(function* revert(target) {
|
||||||
var total = 0;
|
var total = 0;
|
||||||
var i, iter, item, height, block, tx;
|
var i, iter, item, height, block, tx;
|
||||||
|
|
||||||
iter = this.db.iterator({
|
iter = this.db.iterator({
|
||||||
gte: layout.b(height + 1),
|
gte: layout.b(target + 1),
|
||||||
lte: layout.b(0xffffffff),
|
lte: layout.b(0xffffffff),
|
||||||
reverse: true,
|
reverse: true,
|
||||||
values: true
|
values: true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user