mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-21 19:20:38 +00:00
Use block value correctly when proposing a block (#13368)
* Use block value correctly * Fix the function
This commit is contained in:
parent
856907d760
commit
a068f3877e
@ -347,12 +347,16 @@ func (b *SignedBeaconBlock) IsBlinded() bool {
|
||||
func (b *SignedBeaconBlock) ValueInGwei() uint64 {
|
||||
exec, err := b.block.body.Execution()
|
||||
if err != nil {
|
||||
log.WithError(err).Warn("failed to retrieve execution payload")
|
||||
if !errors.Is(err, consensus_types.ErrUnsupportedField) {
|
||||
log.WithError(err).Warn("failed to retrieve execution payload")
|
||||
}
|
||||
return 0
|
||||
}
|
||||
val, err := exec.ValueInGwei()
|
||||
if err != nil {
|
||||
log.WithError(err).Warn("failed to retrieve value in gwei")
|
||||
if !errors.Is(err, consensus_types.ErrUnsupportedField) {
|
||||
log.WithError(err).Warn("failed to retrieve execution payload")
|
||||
}
|
||||
return 0
|
||||
}
|
||||
return val
|
||||
|
Loading…
Reference in New Issue
Block a user