no double spend info
This commit is contained in:
parent
a440fbff10
commit
e38ee0789e
@ -180,7 +180,7 @@ TransactionDb.prototype._fillSpent = function(info, cb) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
TransactionDb.prototype._fillOutpoints = function(txInfo, cb) {
|
TransactionDb.prototype._fillOutpoints = function(txInfo, cb, opts) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
if (!txInfo || txInfo.isCoinBase) return cb();
|
if (!txInfo || txInfo.isCoinBase) return cb();
|
||||||
@ -224,7 +224,7 @@ TransactionDb.prototype._fillOutpoints = function(txInfo, cb) {
|
|||||||
i.doubleSpentTxID = null;
|
i.doubleSpentTxID = null;
|
||||||
}
|
}
|
||||||
return c_in();
|
return c_in();
|
||||||
});
|
}, opts);
|
||||||
},
|
},
|
||||||
function() {
|
function() {
|
||||||
if (!incompleteInputs) {
|
if (!incompleteInputs) {
|
||||||
@ -246,13 +246,14 @@ TransactionDb.prototype._getInfo = function(txid, next, opts) {
|
|||||||
|
|
||||||
|
|
||||||
self._fillOutpoints(txInfo, function() {
|
self._fillOutpoints(txInfo, function() {
|
||||||
|
|
||||||
if (opts.noExtraInfo)
|
if (opts.noExtraInfo)
|
||||||
return next(null,txInfo);
|
return next(null,txInfo);
|
||||||
|
|
||||||
self._fillSpent(txInfo, function() {
|
self._fillSpent(txInfo, function() {
|
||||||
return next(null, txInfo);
|
return next(null, txInfo);
|
||||||
});
|
});
|
||||||
});
|
}, opts);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -280,7 +281,7 @@ TransactionDb.prototype.fromIdWithInfo = function(txid, cb, opts) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Gets address info from an outpoint
|
// Gets address info from an outpoint
|
||||||
TransactionDb.prototype.fromTxIdN = function(txid, n, cb) {
|
TransactionDb.prototype.fromTxIdN = function(txid, n, cb, opts) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var k = OUTS_PREFIX + txid + '-' + n;
|
var k = OUTS_PREFIX + txid + '-' + n;
|
||||||
|
|
||||||
@ -300,6 +301,9 @@ TransactionDb.prototype.fromTxIdN = function(txid, n, cb) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opts.noExtraInfo)
|
||||||
|
return cb(null, ret);
|
||||||
|
|
||||||
// spent?
|
// spent?
|
||||||
var k = SPENT_PREFIX + txid + '-' + n + '-';
|
var k = SPENT_PREFIX + txid + '-' + n + '-';
|
||||||
db.createReadStream({
|
db.createReadStream({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user