This commit is contained in:
Christopher Jeffrey 2016-08-14 19:08:02 -07:00
parent 7e3575129a
commit 7259ffa91e
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
4 changed files with 9 additions and 20 deletions

View File

@ -1060,14 +1060,14 @@ RPC.prototype.getmempoolinfo = function getmempoolinfo(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)'));
callback(new Error('Not implemented.'));
};
RPC.prototype.getmempooldescendants = function getmempooldescendants(args, callback) {
if (args.help || args.length < 1 || args.length > 2) {
return callback(new RPCError('getmempooldescendants txid (verbose)'));
if (args.help || args.length < 1 || args.length > 2)
return callback(new RPCError('getmempooldescendants txid (verbose)'));
callback(new Error('Not implemented.'));
};

View File

@ -7,8 +7,6 @@
'use strict';
var Network = require('../network');
var utils = require('../utils');
var assert = utils.assert;
var request = require('./request');
/**
@ -46,8 +44,6 @@ function RPCClient(options) {
*/
RPCClient.prototype.call = function call(method, params, callback) {
var self = this;
request({
method: 'POST',
uri: this.uri,

View File

@ -583,7 +583,6 @@ HTTPServer.prototype._init = function _init() {
// Create wallet
this.post('/wallet/:id?', function(req, res, next, send) {
var json;
self.walletdb.create(req.options, function(err, wallet) {
if (err)
return next(err);
@ -709,8 +708,6 @@ HTTPServer.prototype._init = function _init() {
// Abandon Wallet TX
this.del('/wallet/:id/tx/:hash', function(req, res, next, send) {
var hash = req.options.hash;
var account = req.options.account;
req.wallet.abandon(hash, function(err) {
if (err)
return next(err);
@ -1264,12 +1261,12 @@ ClientSocket.prototype.bind = function bind(obj, event, listener) {
};
ClientSocket.prototype.unbind = function unbind(obj, event) {
var i, event;
var i, item;
for (i = this.events.length - 1; i >= 0; i--) {
event = this.events[i]
if (event[0] === obj && event[1] === event) {
obj.removeListener(event, event[2]);
item = this.events[i];
if (item[0] === obj && item[1] === event) {
obj.removeListener(event, item[2]);
this.events.splice(i, 1);
}
}
@ -1316,7 +1313,7 @@ ClientSocket.prototype.unwatchChain = function unwatchChain() {
this.unbind(this.mempool, 'tx');
};
ClientSocket.prototype.testBlock = function testBlock(tx) {
ClientSocket.prototype.testBlock = function testBlock(block) {
var txs = [];
var i, tx;
@ -1352,9 +1349,8 @@ ClientSocket.prototype.testFilter = function testFilter(tx) {
ClientSocket.prototype.scan = function scan(start, callback) {
var self = this;
var hash;
var hashes = Object.keys(this.filter);
hashes = Object.keys(this.filter);
start = utils.revHex(start);
this.chain.db.scan(start, hashes, function(tx, entry, next) {

View File

@ -1327,9 +1327,6 @@ TXDB.prototype.getLast = function getLast(account, limit, callback) {
*/
TXDB.prototype.getHistory = function getHistory(account, callback) {
var self = this;
var txs = [];
if (typeof account === 'function') {
callback = account;
account = null;