miner: fix chart values for non-mev blocks

This commit is contained in:
Péter Szilágyi 2024-03-12 17:50:50 +02:00
parent 2f01d3783d
commit 8dd434cde2

View file

@ -207,7 +207,7 @@ func (miner *Miner) ReportFeeMetrics(payload *Payload, block *types.Block) {
feeInEther := new(big.Float).Quo(new(big.Float).SetInt(payload.fullFees), big.NewFloat(params.Ether)) feeInEther := new(big.Float).Quo(new(big.Float).SetInt(payload.fullFees), big.NewFloat(params.Ether))
log.Info("Plain block detected", "reward", feeInEther) log.Info("Plain block detected", "reward", feeInEther)
blockIncludedFeeGauge.Update(new(big.Int).Div(payout.Value(), bigGwei).Int64()) blockIncludedFeeGauge.Update(new(big.Int).Div(payload.fullFees, bigGwei).Int64())
} }
} }
} else if payload.full.Coinbase() != block.Coinbase() { } else if payload.full.Coinbase() != block.Coinbase() {
@ -227,7 +227,7 @@ func (miner *Miner) ReportFeeMetrics(payload *Payload, block *types.Block) {
feeInEther := new(big.Float).Quo(new(big.Float).SetInt(payload.fullFees), big.NewFloat(params.Ether)) feeInEther := new(big.Float).Quo(new(big.Float).SetInt(payload.fullFees), big.NewFloat(params.Ether))
log.Warn("MEV block detected, unknown reward", "reward", "unknown", "local", feeInEther) log.Warn("MEV block detected, unknown reward", "reward", "unknown", "local", feeInEther)
blockIncludedFeeGauge.Update(new(big.Int).Div(payout.Value(), bigGwei).Int64()) blockIncludedFeeGauge.Update(new(big.Int).Div(payload.fullFees, bigGwei).Int64())
} }
} }
} else { } else {