handle double spends in /txs

This commit is contained in:
Matias Alejo Garcia 2015-07-15 09:57:08 -03:00
parent bdb35b3b5f
commit ab6564eca5

View File

@ -164,8 +164,14 @@ exports.multitxs = function(req, res, next) {
tx.info.firstSeenTs = tx2.firstSeenTs; tx.info.firstSeenTs = tx2.firstSeenTs;
txIndex[tx.txid].info = tx.info; txIndex[tx.txid].info = tx.info;
} else } else {
nbTxs--; // TX no longer available
txIndex[tx2.txid].info = {
txid: tx2.txid,
possibleDoubleSpend: true,
firstSeenTs: tx2.firstSeenTs,
};
}
callback(); callback();
}); });