whisper/mailserver : fix db -> s.db

This commit is contained in:
ucwong 2020-04-04 08:22:23 +00:00
parent da009b060d
commit 223f1caaf7

View file

@ -71,7 +71,7 @@ func (s *WMailServer) Init(shh *whisper.Whisper, path string, password string, p
s.db, err = leveldb.OpenFile(path, &opt.Options{OpenFilesCacheCapacity: 32}) s.db, err = leveldb.OpenFile(path, &opt.Options{OpenFilesCacheCapacity: 32})
if _, iscorrupted := err.(*errors.ErrCorrupted); iscorrupted { if _, iscorrupted := err.(*errors.ErrCorrupted); iscorrupted {
db, err = leveldb.RecoverFile(path, nil) s.db, err = leveldb.RecoverFile(path, nil)
} }
if err != nil { if err != nil {
return fmt.Errorf("open DB file: %s", err) return fmt.Errorf("open DB file: %s", err)