Skip to content

Commit

Permalink
Merge pull request #557 from qianbin/fix-error-load-bft-quality
Browse files Browse the repository at this point in the history
fix: avoid unexpected error in bft process
  • Loading branch information
libotony authored Dec 9, 2022
2 parents 453edc5 + f0fff75 commit 4a3e1aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bft/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,12 @@ func (engine *BFTEngine) getQuality(id thor.Bytes32) (quality uint32, err error)
}
}()

return loadQuality(engine.data, id)
quality, err = loadQuality(engine.data, id)
// no quality saved yet
if engine.data.IsNotFound(err) {
return 0, nil
}
return
}

func getCheckPoint(blockNum uint32) uint32 {
Expand Down

0 comments on commit 4a3e1aa

Please sign in to comment.