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>
This commit is contained in:
terencechain 2022-08-30 09:23:21 -07:00 committed by GitHub
parent 85896e994e
commit 166f8a1eb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,9 +127,8 @@ func (vs *Server) getPayloadHeaderFromBuilder(ctx context.Context, slot types.Sl
return nil, errors.New("builder returned nil bid") return nil, errors.New("builder returned nil bid")
} }
v := bid.Message.Value v := new(big.Int).SetBytes(bytesutil.ReverseByteOrder(bid.Message.Value))
if v.String() == "0" {
if new(big.Int).SetBytes(bytesutil.ReverseByteOrder(v)).String() == "0" {
return nil, errors.New("builder returned header with 0 bid amount") 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{ log.WithFields(logrus.Fields{
"bid": bytesutil.BytesToUint64BigEndian(bid.Message.Value), "value": v.String(),
"builderPubKey": fmt.Sprintf("%#x", bid.Message.Pubkey), "builderPubKey": fmt.Sprintf("%#x", bid.Message.Pubkey),
"blockHash": fmt.Sprintf("%#x", bid.Message.Header.BlockHash), "blockHash": fmt.Sprintf("%#x", bid.Message.Header.BlockHash),
}).Info("Received header with bid") }).Info("Received header with bid")