Fix flakey behavior in simulated backend Rollback

This commit is contained in:
Pierre Rousset 2025-02-21 11:28:11 +09:00 committed by sivaratrisrinivas
parent 14ec69dfd6
commit cf6e0dd62d

View file

@ -556,6 +556,7 @@ func (p *TxPool) Sync() error {
// Clear removes all tracked txs from the subpools. // Clear removes all tracked txs from the subpools.
func (p *TxPool) Clear() { func (p *TxPool) Clear() {
p.Sync()
for _, subpool := range p.subpools { for _, subpool := range p.subpools {
subpool.Clear() subpool.Clear()
} }