refactor: lint.

This commit is contained in:
Christopher Jeffrey 2016-12-07 17:52:53 -08:00
parent 1269aab7a5
commit 4e9bec4cd3
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
5 changed files with 6 additions and 7 deletions

View File

@ -114,7 +114,6 @@ CoinView.prototype.spendFrom = function spendFrom(coins, index) {
CoinView.prototype.getCoin = function getCoin(hash, index) {
var coins = this.get(hash);
var entry;
if (!coins)
return;

View File

@ -1257,7 +1257,7 @@ Mempool.prototype.hasOrphan = function hasOrphan(hash) {
Mempool.prototype.storeOrphan = function storeOrphan(tx, missing) {
var hash = tx.hash('hex');
var i, input, prev;
var i, prev;
if (tx.getWeight() > constants.tx.MAX_WEIGHT) {
this.logger.debug('Ignoring large orphan: %s', tx.txid());

View File

@ -820,7 +820,7 @@ Pool.prototype.__handleHeaders = co(function* _handleHeaders(headers, peer) {
*/
Pool.prototype._handleBlocks = co(function* _handleBlocks(hashes, peer) {
var i, hash, exists;
var i, hash;
assert(!this.options.headers);
@ -1211,7 +1211,7 @@ Pool.prototype.createPeer = function createPeer(addr, socket) {
self.fillPeers();
});
peer.on('txs', co(function* (txs) {
peer.on('txs', function (txs) {
var i, hash;
self.emit('txs', txs, peer);
@ -1227,7 +1227,7 @@ Pool.prototype.createPeer = function createPeer(addr, socket) {
self.emit('error', e);
}
}
}));
});
peer.on('version', function(version) {
self.logger.info(

View File

@ -850,6 +850,7 @@ MTX.prototype.signAsync = function signAsync(ring, type) {
*/
MTX.prototype.estimateSize = co(function* estimateSize(estimate) {
var scale = constants.WITNESS_SCALE_FACTOR;
var total = 0;
var i, input, output, size, prev;

View File

@ -24,7 +24,6 @@ var TXDB = require('./txdb');
var Path = require('./path');
var common = require('./common');
var Address = require('../primitives/address');
var Script = require('../script/script');
var MTX = require('../primitives/mtx');
var WalletKey = require('./walletkey');
var HD = require('../hd/hd');
@ -1454,7 +1453,7 @@ Wallet.prototype._fund = co(function* fund(tx, options) {
Wallet.prototype.getAccountByAddress = co(function* getAccountByAddress(address) {
var hash = Address.getHash(address, 'hex');
var path, account;
var path;
if (!hash)
return;