commit
437b9e40ca
@ -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;
|
||||
|
||||
if (!txInfo || txInfo.isCoinBase) return cb();
|
||||
@ -224,7 +224,7 @@ TransactionDb.prototype._fillOutpoints = function(txInfo, cb) {
|
||||
i.doubleSpentTxID = null;
|
||||
}
|
||||
return c_in();
|
||||
});
|
||||
}, opts);
|
||||
},
|
||||
function() {
|
||||
if (!incompleteInputs) {
|
||||
@ -246,13 +246,14 @@ TransactionDb.prototype._getInfo = function(txid, next, opts) {
|
||||
|
||||
|
||||
self._fillOutpoints(txInfo, function() {
|
||||
|
||||
if (opts.noExtraInfo)
|
||||
return next(null,txInfo);
|
||||
|
||||
self._fillSpent(txInfo, function() {
|
||||
return next(null, txInfo);
|
||||
});
|
||||
});
|
||||
}, opts);
|
||||
});
|
||||
};
|
||||
|
||||
@ -280,7 +281,7 @@ TransactionDb.prototype.fromIdWithInfo = function(txid, cb, opts) {
|
||||
};
|
||||
|
||||
// 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 k = OUTS_PREFIX + txid + '-' + n;
|
||||
|
||||
@ -300,6 +301,9 @@ TransactionDb.prototype.fromTxIdN = function(txid, n, cb) {
|
||||
};
|
||||
}
|
||||
|
||||
if (opts.noExtraInfo)
|
||||
return cb(null, ret);
|
||||
|
||||
// spent?
|
||||
var k = SPENT_PREFIX + txid + '-' + n + '-';
|
||||
db.createReadStream({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user