Merge pull request #340 from matiu/feat/handle-d-spends

handle double spends in /txs
This commit is contained in:
Ivan Socolsky 2015-07-15 10:30:06 -03:00
commit 52b1d658f0

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