lint.
This commit is contained in:
parent
7e3575129a
commit
7259ffa91e
@ -1060,14 +1060,14 @@ RPC.prototype.getmempoolinfo = function getmempoolinfo(args, callback) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
RPC.prototype.getmempoolancestors = function getmempoolancestors(args, callback) {
|
RPC.prototype.getmempoolancestors = function getmempoolancestors(args, callback) {
|
||||||
if (args.help || args.length < 1 || args.length > 2) {
|
if (args.help || args.length < 1 || args.length > 2)
|
||||||
return callback(new RPCError('getmempoolancestors txid (verbose)'));
|
return callback(new RPCError('getmempoolancestors txid (verbose)'));
|
||||||
callback(new Error('Not implemented.'));
|
callback(new Error('Not implemented.'));
|
||||||
};
|
};
|
||||||
|
|
||||||
RPC.prototype.getmempooldescendants = function getmempooldescendants(args, callback) {
|
RPC.prototype.getmempooldescendants = function getmempooldescendants(args, callback) {
|
||||||
if (args.help || args.length < 1 || args.length > 2) {
|
if (args.help || args.length < 1 || args.length > 2)
|
||||||
return callback(new RPCError('getmempooldescendants txid (verbose)'));
|
return callback(new RPCError('getmempooldescendants txid (verbose)'));
|
||||||
callback(new Error('Not implemented.'));
|
callback(new Error('Not implemented.'));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -7,8 +7,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var Network = require('../network');
|
var Network = require('../network');
|
||||||
var utils = require('../utils');
|
|
||||||
var assert = utils.assert;
|
|
||||||
var request = require('./request');
|
var request = require('./request');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,8 +44,6 @@ function RPCClient(options) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
RPCClient.prototype.call = function call(method, params, callback) {
|
RPCClient.prototype.call = function call(method, params, callback) {
|
||||||
var self = this;
|
|
||||||
|
|
||||||
request({
|
request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
uri: this.uri,
|
uri: this.uri,
|
||||||
|
|||||||
@ -583,7 +583,6 @@ HTTPServer.prototype._init = function _init() {
|
|||||||
|
|
||||||
// Create wallet
|
// Create wallet
|
||||||
this.post('/wallet/:id?', function(req, res, next, send) {
|
this.post('/wallet/:id?', function(req, res, next, send) {
|
||||||
var json;
|
|
||||||
self.walletdb.create(req.options, function(err, wallet) {
|
self.walletdb.create(req.options, function(err, wallet) {
|
||||||
if (err)
|
if (err)
|
||||||
return next(err);
|
return next(err);
|
||||||
@ -709,8 +708,6 @@ HTTPServer.prototype._init = function _init() {
|
|||||||
// Abandon Wallet TX
|
// Abandon Wallet TX
|
||||||
this.del('/wallet/:id/tx/:hash', function(req, res, next, send) {
|
this.del('/wallet/:id/tx/:hash', function(req, res, next, send) {
|
||||||
var hash = req.options.hash;
|
var hash = req.options.hash;
|
||||||
var account = req.options.account;
|
|
||||||
|
|
||||||
req.wallet.abandon(hash, function(err) {
|
req.wallet.abandon(hash, function(err) {
|
||||||
if (err)
|
if (err)
|
||||||
return next(err);
|
return next(err);
|
||||||
@ -1264,12 +1261,12 @@ ClientSocket.prototype.bind = function bind(obj, event, listener) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ClientSocket.prototype.unbind = function unbind(obj, event) {
|
ClientSocket.prototype.unbind = function unbind(obj, event) {
|
||||||
var i, event;
|
var i, item;
|
||||||
|
|
||||||
for (i = this.events.length - 1; i >= 0; i--) {
|
for (i = this.events.length - 1; i >= 0; i--) {
|
||||||
event = this.events[i]
|
item = this.events[i];
|
||||||
if (event[0] === obj && event[1] === event) {
|
if (item[0] === obj && item[1] === event) {
|
||||||
obj.removeListener(event, event[2]);
|
obj.removeListener(event, item[2]);
|
||||||
this.events.splice(i, 1);
|
this.events.splice(i, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1316,7 +1313,7 @@ ClientSocket.prototype.unwatchChain = function unwatchChain() {
|
|||||||
this.unbind(this.mempool, 'tx');
|
this.unbind(this.mempool, 'tx');
|
||||||
};
|
};
|
||||||
|
|
||||||
ClientSocket.prototype.testBlock = function testBlock(tx) {
|
ClientSocket.prototype.testBlock = function testBlock(block) {
|
||||||
var txs = [];
|
var txs = [];
|
||||||
var i, tx;
|
var i, tx;
|
||||||
|
|
||||||
@ -1352,9 +1349,8 @@ ClientSocket.prototype.testFilter = function testFilter(tx) {
|
|||||||
|
|
||||||
ClientSocket.prototype.scan = function scan(start, callback) {
|
ClientSocket.prototype.scan = function scan(start, callback) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var hash;
|
var hashes = Object.keys(this.filter);
|
||||||
|
|
||||||
hashes = Object.keys(this.filter);
|
|
||||||
start = utils.revHex(start);
|
start = utils.revHex(start);
|
||||||
|
|
||||||
this.chain.db.scan(start, hashes, function(tx, entry, next) {
|
this.chain.db.scan(start, hashes, function(tx, entry, next) {
|
||||||
|
|||||||
@ -1327,9 +1327,6 @@ TXDB.prototype.getLast = function getLast(account, limit, callback) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
TXDB.prototype.getHistory = function getHistory(account, callback) {
|
TXDB.prototype.getHistory = function getHistory(account, callback) {
|
||||||
var self = this;
|
|
||||||
var txs = [];
|
|
||||||
|
|
||||||
if (typeof account === 'function') {
|
if (typeof account === 'function') {
|
||||||
callback = account;
|
callback = account;
|
||||||
account = null;
|
account = null;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user