bitcoind: include height in spentinfo

This commit is contained in:
Braydon Fuller 2016-04-12 15:30:17 -04:00
parent 37f31fdb19
commit cdfe572344
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -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();
});
},