Merge pull request #237 from braydonf/tip-error
Database: Warn about inconsistent database state.
This commit is contained in:
commit
5451a9033e
@ -122,6 +122,10 @@ DB.prototype.start = function(callback) {
|
|||||||
} else {
|
} else {
|
||||||
self.getBlock(metadata.tip, function(err, tip) {
|
self.getBlock(metadata.tip, function(err, tip) {
|
||||||
if(err) {
|
if(err) {
|
||||||
|
log.warn(
|
||||||
|
'Database is in an inconsistent state, a reindex is needed. Could not get current tip:',
|
||||||
|
metadata.tip
|
||||||
|
);
|
||||||
return callback(err);
|
return callback(err);
|
||||||
}
|
}
|
||||||
self.tip = tip;
|
self.tip = tip;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user