lint.
This commit is contained in:
parent
833e5491f1
commit
048a99b9ba
@ -1734,6 +1734,7 @@ ChainDB.prototype.hasCoins = function hasCoins(hash, callback) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
ChainDB.prototype.pruneBlock = function pruneBlock(block, callback) {
|
ChainDB.prototype.pruneBlock = function pruneBlock(block, callback) {
|
||||||
|
var self = this;
|
||||||
var futureHeight, key;
|
var futureHeight, key;
|
||||||
|
|
||||||
if (this.options.spv)
|
if (this.options.spv)
|
||||||
@ -1803,7 +1804,7 @@ ChainState.prototype.disconnect = function connect(block) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ChainState.prototype.add = function add(coin) {
|
ChainState.prototype.add = function add(coin) {
|
||||||
this.coin++
|
this.coin++;
|
||||||
this.value += coin.value;
|
this.value += coin.value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -75,7 +75,7 @@ Locker.prototype.hasPending = function hasPending(key) {
|
|||||||
Locker.prototype.lock = function lock(func, args, force) {
|
Locker.prototype.lock = function lock(func, args, force) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var callback = args[args.length - 1];
|
var callback = args[args.length - 1];
|
||||||
var obj, called, arg;
|
var obj, called;
|
||||||
|
|
||||||
if (typeof callback !== 'function')
|
if (typeof callback !== 'function')
|
||||||
throw new Error(func.name + ' requires a callback.');
|
throw new Error(func.name + ' requires a callback.');
|
||||||
|
|||||||
@ -1263,9 +1263,10 @@ TXDB.prototype.unconfirm = function unconfirm(hash, callback, force) {
|
|||||||
TXDB.prototype._unconfirm = function unconfirm(tx, info, callback) {
|
TXDB.prototype._unconfirm = function unconfirm(tx, info, callback) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var hash = tx.hash('hex');
|
var hash = tx.hash('hex');
|
||||||
|
var height = tx.height;
|
||||||
var i, account;
|
var i, account;
|
||||||
|
|
||||||
if (tx.height === -1)
|
if (height === -1)
|
||||||
return callback(null, false, info);
|
return callback(null, false, info);
|
||||||
|
|
||||||
tx.height = -1;
|
tx.height = -1;
|
||||||
|
|||||||
@ -640,7 +640,7 @@ WalletDB.prototype.auth = function auth(wid, token, callback) {
|
|||||||
|
|
||||||
WalletDB.prototype.create = function create(options, callback) {
|
WalletDB.prototype.create = function create(options, callback) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var wallet, unlock;
|
var wallet;
|
||||||
|
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
callback = options;
|
callback = options;
|
||||||
@ -801,11 +801,11 @@ WalletDB.prototype.getAccounts = function getAccounts(wid, callback) {
|
|||||||
return callback(err);
|
return callback(err);
|
||||||
|
|
||||||
// Get it out of hash table mode.
|
// Get it out of hash table mode.
|
||||||
accounts = new Array(map.length);
|
accounts = [];
|
||||||
|
|
||||||
for (i = 0; i < map.length; i++) {
|
for (i = 0; i < map.length; i++) {
|
||||||
assert(map[i] != null);
|
assert(map[i] != null);
|
||||||
accounts[i] = map[i];
|
accounts.push(map[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
callback(null, accounts);
|
callback(null, accounts);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user