cleanup: replace common.Exit with log.Crit or log.Fatal

Later we can pick another logger that has fatal, like zap?
This commit is contained in:
Tzu-Jung Lee
2017-01-16 23:23:19 -08:00
parent 1150bbfe36
commit 9134905f42
10 changed files with 28 additions and 21 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ func LoadLastBlock(db dbm.DB) (lastBlock LastBlockInfo) {
wire.ReadBinaryPtr(&lastBlock, r, 0, n, err)
if *err != nil {
// DATA HAS BEEN CORRUPTED OR THE SPEC HAS CHANGED
common.Exit(fmt.Sprintf("Data has been corrupted or its spec has changed: %v\n", *err))
log.Crit(fmt.Sprintf("Data has been corrupted or its spec has changed: %v\n", *err))
}
// TODO: ensure that buf is completely read.
}