From 6038ac8753177482650a6bc6ee04a3242d2fafdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Irmak?= Date: Mon, 13 May 2024 15:57:14 +0300 Subject: [PATCH] fix(zktrie): copy trie properly for concurrent access (#747) --- params/version.go | 2 +- trie/zk_trie_test.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/params/version.go b/params/version.go index 235ecb921459..e36f1c8e559b 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 3 // Minor version component of the current release - VersionPatch = 15 // Patch version component of the current release + VersionPatch = 16 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string ) diff --git a/trie/zk_trie_test.go b/trie/zk_trie_test.go index d550beff1b09..6c23abc2764b 100644 --- a/trie/zk_trie_test.go +++ b/trie/zk_trie_test.go @@ -129,8 +129,7 @@ func TestZkTrieConcurrency(t *testing.T) { threads := runtime.NumCPU() tries := make([]*ZkTrie, threads) for i := 0; i < threads; i++ { - cpy := *trie - tries[i] = &cpy + tries[i] = trie.Copy() } // Start a batch of goroutines interactng with the trie pend := new(sync.WaitGroup)