mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-17 13:36:37 +00:00
Fixed race condition
This commit is contained in:
parent
ba43364f36
commit
ad13b402d7
1 changed files with 2 additions and 2 deletions
|
|
@ -196,8 +196,8 @@ func (t *Trie) Update(key, value string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Trie) Get(key string) string {
|
func (t *Trie) Get(key string) string {
|
||||||
t.mut.RLock()
|
t.mut.Lock()
|
||||||
defer t.mut.RUnlock()
|
defer t.mut.Unlock()
|
||||||
|
|
||||||
k := CompactHexDecode(key)
|
k := CompactHexDecode(key)
|
||||||
c := ethutil.NewValue(t.getState(t.Root, k))
|
c := ethutil.NewValue(t.getState(t.Root, k))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue