From f1beb0d1605cf37f52da2d2f2ca1715189b87602 Mon Sep 17 00:00:00 2001 From: hexoscott <70711990+hexoscott@users.noreply.github.com> Date: Wed, 21 Aug 2024 14:50:57 +0100 Subject: [PATCH] fix the long delay after datastream repopulation (#1004) --- zk/utils/utils.go | 1 + 1 file changed, 1 insertion(+) diff --git a/zk/utils/utils.go b/zk/utils/utils.go index 5d4038337f4..3376b863c61 100644 --- a/zk/utils/utils.go +++ b/zk/utils/utils.go @@ -153,6 +153,7 @@ func GetBatchLocalExitRootFromSCStorage(batchNo uint64, db DbReader, tx kv.Tx) ( } stateReader := state.NewPlainState(tx, blockNo+1, systemcontracts.SystemContractCodeLookup["hermez"]) + defer stateReader.Close() rawLer, err := stateReader.ReadAccountStorage(state.GER_MANAGER_ADDRESS, 1, &state.GLOBAL_EXIT_ROOT_POS_1) if err != nil { return libcommon.Hash{}, err