index for output spend matching (speeds ups tx api
This commit is contained in:
parent
7496fc47de
commit
280f815f97
|
@ -103,8 +103,15 @@ function spec(b) {
|
|||
assert(typeof j !== 'undefined','Spent could not be stored: tx ' + txid +
|
||||
'spend in TX:' + k[2] + ',' + k[3]+ ' j:' + j);
|
||||
|
||||
ret[j].spendTxId = v[0];
|
||||
ret[j].spendIndex = parseInt(v[1]);
|
||||
/// TODO Handle multiple addresses here!
|
||||
if (ret[j].spendTxId) {
|
||||
// double spend!
|
||||
assert(0);
|
||||
}
|
||||
else {
|
||||
ret[j].spendTxId = v[0];
|
||||
ret[j].spendIndex = parseInt(v[1]);
|
||||
}
|
||||
})
|
||||
.on('error', function (err) {
|
||||
return cb(err);
|
||||
|
|
Loading…
Reference in New Issue