This commit is contained in:
Christopher Jeffrey 2016-08-18 01:09:23 -07:00
parent 833e5491f1
commit 048a99b9ba
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
4 changed files with 8 additions and 6 deletions

View File

@ -1734,6 +1734,7 @@ ChainDB.prototype.hasCoins = function hasCoins(hash, callback) {
*/
ChainDB.prototype.pruneBlock = function pruneBlock(block, callback) {
var self = this;
var futureHeight, key;
if (this.options.spv)
@ -1803,7 +1804,7 @@ ChainState.prototype.disconnect = function connect(block) {
};
ChainState.prototype.add = function add(coin) {
this.coin++
this.coin++;
this.value += coin.value;
};

View File

@ -75,7 +75,7 @@ Locker.prototype.hasPending = function hasPending(key) {
Locker.prototype.lock = function lock(func, args, force) {
var self = this;
var callback = args[args.length - 1];
var obj, called, arg;
var obj, called;
if (typeof callback !== 'function')
throw new Error(func.name + ' requires a callback.');

View File

@ -1263,9 +1263,10 @@ TXDB.prototype.unconfirm = function unconfirm(hash, callback, force) {
TXDB.prototype._unconfirm = function unconfirm(tx, info, callback) {
var self = this;
var hash = tx.hash('hex');
var height = tx.height;
var i, account;
if (tx.height === -1)
if (height === -1)
return callback(null, false, info);
tx.height = -1;

View File

@ -640,7 +640,7 @@ WalletDB.prototype.auth = function auth(wid, token, callback) {
WalletDB.prototype.create = function create(options, callback) {
var self = this;
var wallet, unlock;
var wallet;
if (typeof options === 'function') {
callback = options;
@ -801,11 +801,11 @@ WalletDB.prototype.getAccounts = function getAccounts(wid, callback) {
return callback(err);
// Get it out of hash table mode.
accounts = new Array(map.length);
accounts = [];
for (i = 0; i < map.length; i++) {
assert(map[i] != null);
accounts[i] = map[i];
accounts.push(map[i]);
}
callback(null, accounts);