mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Fix can propose blind block (#11346)
This commit is contained in:
@@ -150,17 +150,19 @@ func (v *validator) ProposeBlock(ctx context.Context, slot types.Slot, pubKey [f
|
||||
log.WithError(err).Error("Failed to get execution payload")
|
||||
return
|
||||
}
|
||||
txs, err := p.Transactions()
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Failed to get execution payload transactions")
|
||||
return
|
||||
}
|
||||
log = log.WithFields(logrus.Fields{
|
||||
"payloadHash": fmt.Sprintf("%#x", bytesutil.Trunc(p.BlockHash())),
|
||||
"parentHash": fmt.Sprintf("%#x", bytesutil.Trunc(p.ParentHash())),
|
||||
"blockNumber": p.BlockNumber,
|
||||
"txCount": len(txs),
|
||||
})
|
||||
if !blk.IsBlinded() {
|
||||
txs, err := p.Transactions()
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Failed to get execution payload transactions")
|
||||
return
|
||||
}
|
||||
log = log.WithField("txCount", len(txs))
|
||||
}
|
||||
if p.GasLimit() != 0 {
|
||||
log = log.WithField("gasUtilized", float64(p.GasUsed())/float64(p.GasLimit()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user