Merge pull request #257 from laudney/master

Fix confirmation info for multiple spent attempts
This commit is contained in:
Matias Alejo Garcia 2014-11-20 04:10:34 -03:00
commit 492157d2c8

View File

@ -329,10 +329,10 @@ BlockDb.prototype._fillConfirmationsOneSpent = function(o, chainHeight, cb) {
async.eachLimit(o.multipleSpentAttempts, CONCURRENCY,
function(oi, e_c) {
// 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 (height>=0) {
o.spentTxId = oi.spentTxId;
o.spentTxId = oi.txid;
o.index = oi.index;
o.spentIsConfirmed = chainHeight >= height;
o.spentConfirmations = chainHeight - height +1;