From 45b28b723b92eb9f8f30097bdf35a301c4c82272 Mon Sep 17 00:00:00 2001 From: Ekaterina Lebedeva Date: Tue, 1 Aug 2023 16:04:18 +0300 Subject: [PATCH] [#3] Remove unnecessary caching in CompileFile At this stage there is no need for such optimization Signed-off-by: Ekaterina Lebedeva --- covertest/compile.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/covertest/compile.go b/covertest/compile.go index 9d67f68..0b9c3b7 100644 --- a/covertest/compile.go +++ b/covertest/compile.go @@ -19,15 +19,8 @@ type ContractWithDebugInfo struct { DebugInfo *compiler.DebugInfo } -// contracts caches the compiled contracts from FS across multiple tests. -var contracts = make(map[string]*neotest.Contract) - // CompileFile compiles a contract from the file and returns its NEF, manifest, hash and debug information. func CompileFile(t testing.TB, sender util.Uint160, srcPath string, configPath string) *ContractWithDebugInfo { - if c, ok := contracts[srcPath]; ok { - return c - } - // nef.NewFile() cares about version a lot. config.Version = "neotest" @@ -56,7 +49,6 @@ func CompileFile(t testing.TB, sender util.Uint160, srcPath string, configPath s NEF: ne, Manifest: m, } - contracts[srcPath] = c return &ContractWithDebugInfo{ Contract: c, DebugInfo: di,