diff --git a/lib/services/address/index.js b/lib/services/address/index.js index 2d0b8b77..d08ddc3e 100644 --- a/lib/services/address/index.js +++ b/lib/services/address/index.js @@ -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);