This commit is contained in:
Christopher Jeffrey 2016-03-29 17:54:54 -07:00
parent 86efd59261
commit dffff280f7
3 changed files with 4 additions and 8 deletions

View File

@ -97,7 +97,6 @@ Fullnode.prototype._init = function _init() {
self.emit('error', err); self.emit('error', err);
}); });
if (0)
this.on('tx', function(tx) { this.on('tx', function(tx) {
self.walletdb.addTX(tx, function(err) { self.walletdb.addTX(tx, function(err) {
if (err) if (err)
@ -117,8 +116,6 @@ Fullnode.prototype._init = function _init() {
self.emit('tx', tx); self.emit('tx', tx);
}); });
// Update the mempool.
if (0)
this.chain.on('add block', function(block) { this.chain.on('add block', function(block) {
self.mempool.addBlock(block, function(err) { self.mempool.addBlock(block, function(err) {
if (err) if (err)
@ -126,7 +123,6 @@ Fullnode.prototype._init = function _init() {
}); });
}); });
if (0)
this.chain.on('remove block', function(block) { this.chain.on('remove block', function(block) {
self.mempool.removeBlock(block, function(err) { self.mempool.removeBlock(block, function(err) {
if (err) if (err)
@ -282,7 +278,7 @@ Fullnode.prototype.getCoin = function getCoin(hash, index, callback) {
}); });
}; };
Fullnode.prototype.getCoinByAddress = function getCoinByAddress(addresses, callback) { Fullnode.prototype.getCoinsByAddress = function getCoinsByAddress(addresses, callback) {
var self = this; var self = this;
this.mempool.getCoinsByAddress(addresses, function(err, coins) { this.mempool.getCoinsByAddress(addresses, function(err, coins) {
if (err) if (err)

View File

@ -283,7 +283,7 @@ Client.prototype.syncWallet = function syncWallet(id, options, callback) {
}); });
}; };
Client.prototype.getCoinByAddress = function getCoinByAddress(address, callback) { Client.prototype.getCoinsByAddress = function getCoinsByAddress(address, callback) {
var body = { addresses: address }; var body = { addresses: address };
return this._post('/coin/address', body, function(err, body) { return this._post('/coin/address', body, function(err, body) {

View File

@ -128,7 +128,7 @@ NodeServer.prototype._init = function _init() {
// UTXO by address // UTXO by address
this.get('/coin/address/:address', function(req, res, next, send) { this.get('/coin/address/:address', function(req, res, next, send) {
self.node.getCoinByAddress(req.options.addresses, function(err, coins) { self.node.getCoinsByAddress(req.options.addresses, function(err, coins) {
if (err) if (err)
return next(err); return next(err);
@ -154,7 +154,7 @@ NodeServer.prototype._init = function _init() {
// Bulk read UTXOs // Bulk read UTXOs
this.post('/coin/address', function(req, res, next, send) { this.post('/coin/address', function(req, res, next, send) {
self.node.getCoinByAddress(req.body.addresses, function(err, coins) { self.node.getCoinsByAddress(req.body.addresses, function(err, coins) {
if (err) if (err)
return next(err); return next(err);