mirror of
https://github.com/tendermint/tendermint.git
synced 2026-07-28 11:02:50 +00:00
evidence: fix data race in Pool.updateValToLastHeight() (#5100)
Fixes #5098. Is this out in a public release? If so, I'll add a changelog entry as well, for backporting.
This commit is contained in:
@@ -712,6 +712,9 @@ func evMapKey(ev types.Evidence) string {
|
||||
}
|
||||
|
||||
func (evpool *Pool) updateValToLastHeight(blockHeight int64, state sm.State) {
|
||||
evpool.mtx.Lock()
|
||||
defer evpool.mtx.Unlock()
|
||||
|
||||
// Update current validators & add new ones.
|
||||
for _, val := range state.Validators.Validators {
|
||||
evpool.valToLastHeight[string(val.Address)] = blockHeight
|
||||
|
||||
Reference in New Issue
Block a user