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 Transaction = require('../../transaction');
|
||||
var bitcore = require('bitcore');
|
||||
var levelup = require('levelup');
|
||||
var $ = bitcore.util.preconditions;
|
||||
var _ = bitcore.deps._;
|
||||
var Hash = bitcore.crypto.Hash;
|
||||
|
@ -763,7 +764,9 @@ AddressService.prototype.getInputForOutput = function(txid, outputIndex, options
|
|||
keyEncoding: 'binary'
|
||||
};
|
||||
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);
|
||||
}
|
||||
var value = self._decodeInputValueMap(buffer);
|
||||
|
|
Loading…
Reference in New Issue