mirror of
https://github.com/arnaucube/go-ethereum.git
synced 2026-02-28 14:06:45 +01:00
Fixed race condition
This commit is contained in:
@@ -196,8 +196,8 @@ func (t *Trie) Update(key, value string) {
|
||||
}
|
||||
|
||||
func (t *Trie) Get(key string) string {
|
||||
t.mut.RLock()
|
||||
defer t.mut.RUnlock()
|
||||
t.mut.Lock()
|
||||
defer t.mut.Unlock()
|
||||
|
||||
k := CompactHexDecode(key)
|
||||
c := ethutil.NewValue(t.getState(t.Root, k))
|
||||
|
||||
Reference in New Issue
Block a user