miner: use env for tracing instead of block object (#728)

This commit is contained in:
Manav Darji 2023-02-13 23:41:49 +05:30 committed by GitHub
parent 0ed78b9261
commit 53fd1fe912
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1501,9 +1501,9 @@ func (w *worker) commit(ctx context.Context, env *environment, interval func(),
tracing.SetAttributes(
span,
attribute.Int("number", int(block.Number().Uint64())),
attribute.String("hash", block.Hash().String()),
attribute.String("sealhash", w.engine.SealHash(block.Header()).String()),
attribute.Int("number", int(env.header.Number.Uint64())),
attribute.String("hash", env.header.Hash().String()),
attribute.String("sealhash", w.engine.SealHash(env.header).String()),
attribute.Int("len of env.txs", len(env.txs)),
attribute.Bool("error", err != nil),
)