From cdfe572344fe5228c4b7a9a919f2cd6b8ea86d2b Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Tue, 12 Apr 2016 15:30:17 -0400 Subject: [PATCH] bitcoind: include height in spentinfo --- lib/services/bitcoind.js | 1 + lib/transaction.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/services/bitcoind.js b/lib/services/bitcoind.js index 84d253c6..f935e826 100644 --- a/lib/services/bitcoind.js +++ b/lib/services/bitcoind.js @@ -1286,6 +1286,7 @@ Bitcoin.prototype.getTransactionWithBlockInfo = function(txid, callback) { for (var i = 0; i < response.result.vout.length; i++) { tx.outputs[i].__spentTxId = response.result.vout[i].spentTxId; tx.outputs[i].__spentIndex = response.result.vout[i].spentIndex; + tx.outputs[i].__spentHeight = response.result.vout[i].spentHeight; } self.transactionInfoCache.set(txid, tx); done(null, tx); diff --git a/lib/transaction.js b/lib/transaction.js index e4cccd8b..ef1d7d2a 100644 --- a/lib/transaction.js +++ b/lib/transaction.js @@ -26,6 +26,7 @@ Transaction.prototype.populateSpentInfo = function(db, options, callback) { } self.outputs[outputIndex].__spentTxId = info.txid; self.outputs[outputIndex].__spentIndex = info.index; + self.outputs[outputIndex].__spentHeight = info.height; next(); }); },