storage: panic on error in boltdb.Seek

Error in Seek means something is terribly wrong (e.g. db was not opened) and
error drop is not the right thing to do, because caller
will continue working with the wrong view.
This commit is contained in:
Evgenii Stratonikov 2020-01-09 10:38:09 +03:00
parent 9a8f5c2a5d
commit 9c79684516

View file

@ -7,7 +7,6 @@ import (
"github.com/CityOfZion/neo-go/pkg/io"
"github.com/etcd-io/bbolt"
log "github.com/sirupsen/logrus"
"github.com/syndtr/goleveldb/leveldb/util"
)
@ -109,7 +108,7 @@ func (s *BoltDBStore) Seek(key []byte, f func(k, v []byte)) {
return nil
})
if err != nil {
log.Error("error while executing seek in boltDB")
panic(err)
}
}