From d423305f07fe5390ca957a9f08c93b5e6a3cbef2 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 13 Apr 2015 22:57:03 +0200 Subject: [PATCH] state: fixed nonce issue in managed state Rlock => Lock when creating a new nonce --- core/state/managed_state.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/state/managed_state.go b/core/state/managed_state.go index 9d2fc48e7..97d098039 100644 --- a/core/state/managed_state.go +++ b/core/state/managed_state.go @@ -52,8 +52,8 @@ func (ms *ManagedState) RemoveNonce(addr common.Address, n uint64) { // NewNonce returns the new canonical nonce for the managed account func (ms *ManagedState) NewNonce(addr common.Address) uint64 { - ms.mu.RLock() - defer ms.mu.RUnlock() + ms.mu.Lock() + defer ms.mu.Unlock() account := ms.getAccount(addr) for i, nonce := range account.nonces { -- GitLab