mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-04 10:25:04 +00:00
In `buildPayload()`, the background goroutine uses a `select` to wait on the recommit timer, the stop channel, and the end timer. When both `timer.C` and `payload.stop` are ready simultaneously, Go's `select` picks a case non-deterministically. This means the loop can enter the `timer.C` case and perform an unnecessary `generateWork` call even after the payload has been resolved. Add a non-blocking check of `payload.stop` at the top of the `timer.C` case to exit immediately when the payload has already been delivered. |
||
|---|---|---|
| .. | ||
| miner.go | ||
| miner_test.go | ||
| ordering.go | ||
| ordering_test.go | ||
| payload_building.go | ||
| payload_building_test.go | ||
| pending.go | ||
| worker.go | ||