Fix confirmation info for multiple spent attempts

Use the correct property when going over multiple spent attempts.
This commit is contained in:
Larry Ren 2014-11-19 21:23:24 +00:00
parent 4815554645
commit 08a1ae9fab

View File

@ -329,10 +329,10 @@ BlockDb.prototype._fillConfirmationsOneSpent = function(o, chainHeight, cb) {
async.eachLimit(o.multipleSpentAttempts, CONCURRENCY, async.eachLimit(o.multipleSpentAttempts, CONCURRENCY,
function(oi, e_c) { function(oi, e_c) {
// Only one will be confirmed // Only one will be confirmed
self.getBlockForTx(oi.spentTxId, function(err, hash, height) { self.getBlockForTx(oi.txid, function(err, hash, height) {
if (err) return; if (err) return;
if (height>=0) { if (height>=0) {
o.spentTxId = oi.spentTxId; o.spentTxId = oi.txid;
o.index = oi.index; o.index = oi.index;
o.spentIsConfirmed = chainHeight >= height; o.spentIsConfirmed = chainHeight >= height;
o.spentConfirmations = chainHeight - height +1; o.spentConfirmations = chainHeight - height +1;