mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +00:00
fix(zktrie): copy trie properly for concurrent access (#747)
This commit is contained in:
parent
12871c7745
commit
6038ac8753
2 changed files with 2 additions and 3 deletions
|
|
@ -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
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue