From b668cfbb0a94ca579dda3cc120d232a627ea66a8 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 18 Nov 2014 14:13:47 -0800 Subject: [PATCH] add addrFlag. --- lib/bitcoind.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/bitcoind.js b/lib/bitcoind.js index 53edd205..fb400888 100644 --- a/lib/bitcoind.js +++ b/lib/bitcoind.js @@ -369,10 +369,6 @@ Bitcoin.prototype.getBlockHeight = function(height, callback) { Bitcoin.prototype.getTransaction = Bitcoin.prototype.getTx = function(txHash, blockHash, callback) { - if (!callback) { - callback = blockHash; - blockHash = ''; - } if (typeof blockHash === 'function') { callback = blockHash; blockHash = ''; @@ -415,7 +411,11 @@ Bitcoin.prototype.getMiningInfo = function() { }; Bitcoin.prototype.getAddrTransactions = function(addr, callback) { - return bitcoindjs.getAddrTransactions(addr, callback); + return bitcoindjs.getAddrTransactions(addr, function(err, result) { + if (err) return callback(err); + result._addrFlag = true; + return callback(null, result); + }); }; Bitcoin.prototype.getBestBlock = function(callback) {