Skip to content

Commit 8d2920b

Browse files
committed
Avoid a race in the SimulatedBeacon Stop call
Fixes: ethereum#31327
1 parent d219e9b commit 8d2920b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

eth/catalyst/simulated_beacon_api.go

+4
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ func (a *simulatedBeaconAPI) loop() {
7171
break
7272
}
7373
a.sim.Commit()
74+
// Avoid a race condition where tx pool is terminated during Commit.
75+
if err := a.sim.eth.TxPool().Sync(); err != nil {
76+
break
77+
}
7478
}
7579
}
7680
}()

0 commit comments

Comments
 (0)