Skip to content

Commit

Permalink
fix(zktrie): copy trie properly for concurrent access (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak authored May 13, 2024
1 parent 12871c7 commit 6038ac8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
3 changes: 1 addition & 2 deletions trie/zk_trie_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6038ac8

Please sign in to comment.