Skip to content

Commit 398b597

Browse files
committed
use normal mutex to hold lock on simulationState.SetContext
1 parent 394d411 commit 398b597

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

baseapp/state/manager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type Manager struct {
4242
prepareProposalState *State
4343
processProposalState *State
4444
finalizeBlockState *State
45-
stateMut sync.RWMutex
45+
stateMut sync.Mutex
4646

4747
gasConfig config.GasConfig
4848
}
@@ -54,8 +54,8 @@ func NewManager(gasConfig config.GasConfig) *Manager {
5454
}
5555

5656
func (mgr *Manager) GetState(mode sdk.ExecMode) *State {
57-
mgr.stateMut.RLock()
58-
defer mgr.stateMut.RUnlock()
57+
mgr.stateMut.Lock()
58+
defer mgr.stateMut.Unlock()
5959

6060
switch mode {
6161
case sdk.ExecModeFinalize:

0 commit comments

Comments
 (0)