Give false if spent information not available.
This commit is contained in:
parent
539b263c67
commit
27e90ef41a
@ -8,6 +8,7 @@ var log = index.log;
|
|||||||
var errors = index.errors;
|
var errors = index.errors;
|
||||||
var Transaction = require('../../transaction');
|
var Transaction = require('../../transaction');
|
||||||
var bitcore = require('bitcore');
|
var bitcore = require('bitcore');
|
||||||
|
var levelup = require('levelup');
|
||||||
var $ = bitcore.util.preconditions;
|
var $ = bitcore.util.preconditions;
|
||||||
var _ = bitcore.deps._;
|
var _ = bitcore.deps._;
|
||||||
var Hash = bitcore.crypto.Hash;
|
var Hash = bitcore.crypto.Hash;
|
||||||
@ -763,7 +764,9 @@ AddressService.prototype.getInputForOutput = function(txid, outputIndex, options
|
|||||||
keyEncoding: 'binary'
|
keyEncoding: 'binary'
|
||||||
};
|
};
|
||||||
this.node.services.db.store.get(key, dbOptions, function(err, buffer) {
|
this.node.services.db.store.get(key, dbOptions, function(err, buffer) {
|
||||||
if (err) {
|
if (err instanceof levelup.errors.NotFoundError) {
|
||||||
|
return callback(null, false);
|
||||||
|
} else if (err) {
|
||||||
return callback(err);
|
return callback(err);
|
||||||
}
|
}
|
||||||
var value = self._decodeInputValueMap(buffer);
|
var value = self._decodeInputValueMap(buffer);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user