From 9c79684516ab2e86b0e9a5378c3ac18aee0ef2ad Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 9 Jan 2020 10:38:09 +0300 Subject: [PATCH] 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. --- pkg/core/storage/boltdb_store.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/core/storage/boltdb_store.go b/pkg/core/storage/boltdb_store.go index c0c1e5f9e..4d1d10ed3 100644 --- a/pkg/core/storage/boltdb_store.go +++ b/pkg/core/storage/boltdb_store.go @@ -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) } }