mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
miner: add span attributes for new paylod.stop condition
This commit is contained in:
parent
47633766c0
commit
5fe62fec5c
1 changed files with 7 additions and 0 deletions
|
|
@ -305,6 +305,13 @@ func (miner *Miner) buildPayload(ctx context.Context, args *BuildPayloadArgs, wi
|
|||
// Check payload.stop first to avoid an unnecessary generateWork.
|
||||
select {
|
||||
case <-payload.stop:
|
||||
payload.lock.Lock()
|
||||
emptyDelivered := payload.full == nil
|
||||
payload.lock.Unlock()
|
||||
bSpan.SetAttributes(
|
||||
telemetry.StringAttribute("exit.reason", "delivery"),
|
||||
telemetry.BoolAttribute("empty.delivered", emptyDelivered),
|
||||
)
|
||||
log.Info("Stopping work on payload", "id", payload.id, "reason", "delivery")
|
||||
return
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue