From a068f3877ec65b032cf0b7fd452fffe927d70e43 Mon Sep 17 00:00:00 2001 From: terence Date: Thu, 21 Dec 2023 11:00:34 +0800 Subject: [PATCH] Use block value correctly when proposing a block (#13368) * Use block value correctly * Fix the function --- consensus-types/blocks/getters.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/consensus-types/blocks/getters.go b/consensus-types/blocks/getters.go index 3ea8c4154..0a9309df6 100644 --- a/consensus-types/blocks/getters.go +++ b/consensus-types/blocks/getters.go @@ -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