提交 d423305f 编写于 作者: O obscuren

state: fixed nonce issue in managed state

Rlock => Lock when creating a new nonce
上级 d61ec9ca
...@@ -52,8 +52,8 @@ func (ms *ManagedState) RemoveNonce(addr common.Address, n uint64) { ...@@ -52,8 +52,8 @@ func (ms *ManagedState) RemoveNonce(addr common.Address, n uint64) {
// NewNonce returns the new canonical nonce for the managed account // NewNonce returns the new canonical nonce for the managed account
func (ms *ManagedState) NewNonce(addr common.Address) uint64 { func (ms *ManagedState) NewNonce(addr common.Address) uint64 {
ms.mu.RLock() ms.mu.Lock()
defer ms.mu.RUnlock() defer ms.mu.Unlock()
account := ms.getAccount(addr) account := ms.getAccount(addr)
for i, nonce := range account.nonces { for i, nonce := range account.nonces {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册