From e1bb7bb6669d51a7866f73af6cd5e2d0534625f7 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 8 Dec 2014 12:41:51 -0800 Subject: [PATCH] fix getTx traverse. --- lib/bitcoind.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bitcoind.js b/lib/bitcoind.js index c52779ea..cc9efed6 100644 --- a/lib/bitcoind.js +++ b/lib/bitcoind.js @@ -380,13 +380,13 @@ Bitcoin.prototype.getBlockHeight = function(height, callback) { Bitcoin.prototype.getTransaction = Bitcoin.prototype.getTx = function(txid, blockhash, callback) { - var traverse = false; - if (typeof txid === 'object') { + var traverse = true; + if (typeof txid === 'object' && txid) { var options = txid; callback = blockhash; txid = options.txid || options.tx || options.txhash || options.id || options.hash; blockhash = options.blockhash || options.block; - traverse = options.traverse; + traverse = options.traverse !== false; } if (typeof blockhash === 'function') { callback = blockhash;