refactor: lint.
This commit is contained in:
parent
1269aab7a5
commit
4e9bec4cd3
@ -114,7 +114,6 @@ CoinView.prototype.spendFrom = function spendFrom(coins, index) {
|
|||||||
|
|
||||||
CoinView.prototype.getCoin = function getCoin(hash, index) {
|
CoinView.prototype.getCoin = function getCoin(hash, index) {
|
||||||
var coins = this.get(hash);
|
var coins = this.get(hash);
|
||||||
var entry;
|
|
||||||
|
|
||||||
if (!coins)
|
if (!coins)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -1257,7 +1257,7 @@ Mempool.prototype.hasOrphan = function hasOrphan(hash) {
|
|||||||
|
|
||||||
Mempool.prototype.storeOrphan = function storeOrphan(tx, missing) {
|
Mempool.prototype.storeOrphan = function storeOrphan(tx, missing) {
|
||||||
var hash = tx.hash('hex');
|
var hash = tx.hash('hex');
|
||||||
var i, input, prev;
|
var i, prev;
|
||||||
|
|
||||||
if (tx.getWeight() > constants.tx.MAX_WEIGHT) {
|
if (tx.getWeight() > constants.tx.MAX_WEIGHT) {
|
||||||
this.logger.debug('Ignoring large orphan: %s', tx.txid());
|
this.logger.debug('Ignoring large orphan: %s', tx.txid());
|
||||||
|
|||||||
@ -820,7 +820,7 @@ Pool.prototype.__handleHeaders = co(function* _handleHeaders(headers, peer) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Pool.prototype._handleBlocks = co(function* _handleBlocks(hashes, peer) {
|
Pool.prototype._handleBlocks = co(function* _handleBlocks(hashes, peer) {
|
||||||
var i, hash, exists;
|
var i, hash;
|
||||||
|
|
||||||
assert(!this.options.headers);
|
assert(!this.options.headers);
|
||||||
|
|
||||||
@ -1211,7 +1211,7 @@ Pool.prototype.createPeer = function createPeer(addr, socket) {
|
|||||||
self.fillPeers();
|
self.fillPeers();
|
||||||
});
|
});
|
||||||
|
|
||||||
peer.on('txs', co(function* (txs) {
|
peer.on('txs', function (txs) {
|
||||||
var i, hash;
|
var i, hash;
|
||||||
|
|
||||||
self.emit('txs', txs, peer);
|
self.emit('txs', txs, peer);
|
||||||
@ -1227,7 +1227,7 @@ Pool.prototype.createPeer = function createPeer(addr, socket) {
|
|||||||
self.emit('error', e);
|
self.emit('error', e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
});
|
||||||
|
|
||||||
peer.on('version', function(version) {
|
peer.on('version', function(version) {
|
||||||
self.logger.info(
|
self.logger.info(
|
||||||
|
|||||||
@ -850,6 +850,7 @@ MTX.prototype.signAsync = function signAsync(ring, type) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
MTX.prototype.estimateSize = co(function* estimateSize(estimate) {
|
MTX.prototype.estimateSize = co(function* estimateSize(estimate) {
|
||||||
|
var scale = constants.WITNESS_SCALE_FACTOR;
|
||||||
var total = 0;
|
var total = 0;
|
||||||
var i, input, output, size, prev;
|
var i, input, output, size, prev;
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,6 @@ var TXDB = require('./txdb');
|
|||||||
var Path = require('./path');
|
var Path = require('./path');
|
||||||
var common = require('./common');
|
var common = require('./common');
|
||||||
var Address = require('../primitives/address');
|
var Address = require('../primitives/address');
|
||||||
var Script = require('../script/script');
|
|
||||||
var MTX = require('../primitives/mtx');
|
var MTX = require('../primitives/mtx');
|
||||||
var WalletKey = require('./walletkey');
|
var WalletKey = require('./walletkey');
|
||||||
var HD = require('../hd/hd');
|
var HD = require('../hd/hd');
|
||||||
@ -1454,7 +1453,7 @@ Wallet.prototype._fund = co(function* fund(tx, options) {
|
|||||||
|
|
||||||
Wallet.prototype.getAccountByAddress = co(function* getAccountByAddress(address) {
|
Wallet.prototype.getAccountByAddress = co(function* getAccountByAddress(address) {
|
||||||
var hash = Address.getHash(address, 'hex');
|
var hash = Address.getHash(address, 'hex');
|
||||||
var path, account;
|
var path;
|
||||||
|
|
||||||
if (!hash)
|
if (!hash)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user