mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-24 12:27:17 +00:00
Fixed race condition
This commit is contained in:
parent
ba43364f36
commit
ad13b402d7
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user