mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/rawdb: no log of read error
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
6de206fd3b
commit
e3f320dce9
1 changed files with 4 additions and 4 deletions
|
|
@ -111,10 +111,10 @@ const crashesToKeep = 10
|
|||
func PushUncleanShutdownMarker(db ethdb.KeyValueStore) ([]uint64, uint64, error) {
|
||||
var uncleanShutdowns crashList
|
||||
// Read old data
|
||||
if data, err := db.Get(uncleanShutdownKey); err != nil {
|
||||
log.Warn("Error reading unclean shutdown markers", "error", err)
|
||||
} else if err := rlp.DecodeBytes(data, &uncleanShutdowns); err != nil {
|
||||
return nil, 0, err
|
||||
if data, err := db.Get(uncleanShutdownKey); err == nil {
|
||||
if err := rlp.DecodeBytes(data, &uncleanShutdowns); err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
}
|
||||
var discarded = uncleanShutdowns.Discarded
|
||||
var previous = make([]uint64, len(uncleanShutdowns.Recent))
|
||||
|
|
|
|||
Loading…
Reference in a new issue