From 618acbffc1cbd60a0b745d2d94e0ab871bd8c06c Mon Sep 17 00:00:00 2001 From: ledgerwatch Date: Thu, 6 May 2021 08:39:10 +0100 Subject: [PATCH] Remove storageMode override (#1889) Co-authored-by: Alex Sharp --- eth/backend.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/eth/backend.go b/eth/backend.go index ce4a051b4..6d490149a 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -21,11 +21,13 @@ import ( "context" "crypto/tls" "crypto/x509" + "errors" "fmt" "io/ioutil" "math/big" "os" "path" + "reflect" "runtime" "sync" "sync/atomic" @@ -295,13 +297,13 @@ func New(stack *node.Node, config *ethconfig.Config, gitCommit string) (*Ethereu return nil, err } - //sm, err := ethdb.GetStorageModeFromDB(chainDb) - //if err != nil { - // return nil, err - //} - //if !reflect.DeepEqual(sm, config.StorageMode) { - // return nil, errors.New("mode is " + config.StorageMode.ToString() + " original mode is " + sm.ToString()) - //} + sm, err := ethdb.GetStorageModeFromDB(chainDb) + if err != nil { + return nil, err + } + if !reflect.DeepEqual(sm, config.StorageMode) { + return nil, errors.New("mode is " + config.StorageMode.ToString() + " original mode is " + sm.ToString()) + } if err = stagedsync.UpdateMetrics(chainDb); err != nil { return nil, err