From 03b06a13a828e6abebeade32161213eaba54e4dd Mon Sep 17 00:00:00 2001 From: klim0v Date: Fri, 26 Mar 2021 13:33:20 +0300 Subject: [PATCH] refactor --- coreV2/appdb/appdb.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coreV2/appdb/appdb.go b/coreV2/appdb/appdb.go index 82d4a561b..ecf546227 100644 --- a/coreV2/appdb/appdb.go +++ b/coreV2/appdb/appdb.go @@ -74,8 +74,8 @@ func (appDB *AppDB) GetLastHeight() uint64 { panic(err) } - val = binary.BigEndian.Uint64(result) if len(result) != 0 { + val = binary.BigEndian.Uint64(result) atomic.StoreUint64(&appDB.lastHeight, val) } @@ -118,8 +118,8 @@ func (appDB *AppDB) GetStartHeight() uint64 { panic(err) } - val = binary.BigEndian.Uint64(result) if len(result) != 0 { + val = binary.BigEndian.Uint64(result) atomic.StoreUint64(&appDB.startHeight, val) }