Avoid a race in the SimulatedBeacon Stop call

Fixes: #31327
This commit is contained in:
Pepper Lebeck-Jobe 2025-03-06 11:54:50 +01:00
parent d219e9b005
commit 8d2920bbc4
No known key found for this signature in database

View file

@ -71,6 +71,10 @@ func (a *simulatedBeaconAPI) loop() {
break
}
a.sim.Commit()
// Avoid a race condition where tx pool is terminated during Commit.
if err := a.sim.eth.TxPool().Sync(); err != nil {
break
}
}
}
}()