From 166f8a1eb6bd73493a3be2c4862e4664965acb16 Mon Sep 17 00:00:00 2001 From: terencechain Date: Tue, 30 Aug 2022 09:23:21 -0700 Subject: [PATCH] Log corerct header value (#11354) * Log corerct header value * gaz * Go fmt Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> --- .../rpc/prysm/v1alpha1/validator/proposer_bellatrix.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix.go index 481ed3928..dfc27f476 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix.go @@ -127,9 +127,8 @@ func (vs *Server) getPayloadHeaderFromBuilder(ctx context.Context, slot types.Sl return nil, errors.New("builder returned nil bid") } - v := bid.Message.Value - - if new(big.Int).SetBytes(bytesutil.ReverseByteOrder(v)).String() == "0" { + v := new(big.Int).SetBytes(bytesutil.ReverseByteOrder(bid.Message.Value)) + if v.String() == "0" { return nil, errors.New("builder returned header with 0 bid amount") } @@ -159,7 +158,7 @@ func (vs *Server) getPayloadHeaderFromBuilder(ctx context.Context, slot types.Sl } log.WithFields(logrus.Fields{ - "bid": bytesutil.BytesToUint64BigEndian(bid.Message.Value), + "value": v.String(), "builderPubKey": fmt.Sprintf("%#x", bid.Message.Pubkey), "blockHash": fmt.Sprintf("%#x", bid.Message.Header.BlockHash), }).Info("Received header with bid")