mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
swarm/storage: wrap leveldb ErrNotFound
This commit is contained in:
parent
46f29cf4eb
commit
c0d1ddabb1
1 changed files with 4 additions and 1 deletions
|
|
@ -1005,7 +1005,10 @@ func (s *LDBStore) get(addr Address) (chunk Chunk, err error) {
|
|||
if err != nil {
|
||||
log.Trace("ldbstore.get chunk found but could not be accessed", "key", addr, "err", err)
|
||||
s.deleteNow(index, getIndexKey(addr), s.po(addr))
|
||||
return
|
||||
if err == leveldb.ErrNotFound {
|
||||
return nil, ErrChunkNotFound
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue