fix leveldown problem

This commit is contained in:
Manuel Araoz 2015-04-29 21:59:00 -03:00
parent 085d8f2e39
commit d6efd8a50e
2 changed files with 5 additions and 2 deletions

View File

@ -232,7 +232,10 @@ BlockService.prototype._getLatestHash = function() {
var self = this;
return Promise.try(function() {
return self.database.getAsync(Index.tip);
}).catch(LevelUp.errors.NotFoundError, function() {
}).catch(function(error) {
if (error.toString() !== 'NotFoundError: Key not found in database [tip]') {
throw error;
}
return null;
});
};

View File

@ -47,7 +47,7 @@
"express": "4.11.1",
"glob": "*",
"js-yaml": "^3.2.7",
"leveldown": "~1.0.0",
"leveldown": "~0.10.0",
"levelup": "^0.19.0",
"memdown": "^1.0.0",
"moment": "~2.5.0",