Merge PR #5279: Fix IAVL Iterator Race Condition
This commit is contained in:
parent
1f4f20c3af
commit
60c4f5c7bc
|
@ -182,6 +182,7 @@ to detail this new feature and how state transitions occur.
|
|||
|
||||
### Bug Fixes
|
||||
|
||||
* (iavl) [\#5276](https://github.com/cosmos/cosmos-sdk/issues/5276) Fix potential race condition in `iavlIterator#Close`.
|
||||
* (cli) [\#4763](https://github.com/cosmos/cosmos-sdk/issues/4763) Fix flag `--min-self-delegation` for staking `EditValidator`
|
||||
* (keys) Fix ledger custom coin type support bug
|
||||
* (x/gov) [\#5107](https://github.com/cosmos/cosmos-sdk/pull/5107) Sum validator operator's all voting power when tally votes
|
||||
|
|
|
@ -421,9 +421,13 @@ func (iter *iavlIterator) Value() []byte {
|
|||
return val
|
||||
}
|
||||
|
||||
// Implements types.Iterator.
|
||||
// Close closes the IAVL iterator by closing the quit channel and waiting for
|
||||
// the iterCh to finish/close.
|
||||
func (iter *iavlIterator) Close() {
|
||||
close(iter.quitCh)
|
||||
// wait iterCh to close
|
||||
for range iter.iterCh {
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
|
|
Loading…
Reference in New Issue