From fc02394065724d67ae007d1d7633156b58460572 Mon Sep 17 00:00:00 2001 From: Max Revitt Date: Thu, 16 May 2024 08:12:11 +0100 Subject: [PATCH] tweak(plainstate): add close func to close cursors --- core/state/plain_readonly.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/state/plain_readonly.go b/core/state/plain_readonly.go index b002ae61197..3b74ef47c11 100644 --- a/core/state/plain_readonly.go +++ b/core/state/plain_readonly.go @@ -76,6 +76,13 @@ func NewPlainState(tx kv.Tx, blockNr uint64, systemContractLookup map[libcommon. return ps } +func (s *PlainState) Close() { + s.accHistoryC.Close() + s.storageHistoryC.Close() + s.accChangesC.Close() + s.accHistoryC.Close() +} + func (s *PlainState) SetTrace(trace bool) { s.trace = trace }