diff --git a/beacon-chain/rpc/eth/beacon/blocks.go b/beacon-chain/rpc/eth/beacon/blocks.go index 628e4fcaf0b8..d7ea8dbf85a3 100644 --- a/beacon-chain/rpc/eth/beacon/blocks.go +++ b/beacon-chain/rpc/eth/beacon/blocks.go @@ -663,7 +663,7 @@ func (bs *Server) getBlockBellatrix(ctx context.Context, blk interfaces.SignedBe if blindedBellatrixBlk == nil { return nil, errNilBlock } - signedFullBlock, err := bs.ExecutionPayloadReconstructor.ReconstructFullBellatrixBlock(ctx, blk) + signedFullBlock, err := bs.ExecutionPayloadReconstructor.ReconstructFullBlock(ctx, blk) if err != nil { return nil, errors.Wrapf(err, "could not reconstruct full execution payload to create signed beacon block") } @@ -733,7 +733,7 @@ func (bs *Server) getBlockCapella(ctx context.Context, blk interfaces.SignedBeac if blindedCapellaBlk == nil { return nil, errNilBlock } - signedFullBlock, err := bs.ExecutionPayloadReconstructor.ReconstructFullBellatrixBlock(ctx, blk) + signedFullBlock, err := bs.ExecutionPayloadReconstructor.ReconstructFullBlock(ctx, blk) if err != nil { return nil, errors.Wrapf(err, "could not reconstruct full execution payload to create signed beacon block") } @@ -846,7 +846,7 @@ func (bs *Server) getSSZBlockBellatrix(ctx context.Context, blk interfaces.Signe if blindedBellatrixBlk == nil { return nil, errNilBlock } - signedFullBlock, err := bs.ExecutionPayloadReconstructor.ReconstructFullBellatrixBlock(ctx, blk) + signedFullBlock, err := bs.ExecutionPayloadReconstructor.ReconstructFullBlock(ctx, blk) if err != nil { return nil, errors.Wrapf(err, "could not reconstruct full execution payload to create signed beacon block") } @@ -922,7 +922,7 @@ func (bs *Server) getSSZBlockCapella(ctx context.Context, blk interfaces.SignedB if blindedCapellaBlk == nil { return nil, errNilBlock } - signedFullBlock, err := bs.ExecutionPayloadReconstructor.ReconstructFullBellatrixBlock(ctx, blk) + signedFullBlock, err := bs.ExecutionPayloadReconstructor.ReconstructFullBlock(ctx, blk) if err != nil { return nil, errors.Wrapf(err, "could not reconstruct full execution payload to create signed beacon block") } diff --git a/proto/engine/v1/json_marshal_unmarshal.go b/proto/engine/v1/json_marshal_unmarshal.go index dda72bc83656..15b804512412 100644 --- a/proto/engine/v1/json_marshal_unmarshal.go +++ b/proto/engine/v1/json_marshal_unmarshal.go @@ -160,9 +160,9 @@ func (j *withdrawalJSON) ToWithdrawal() (*Withdrawal, error) { } func (w *Withdrawal) MarshalJSON() ([]byte, error) { - index := hexutil.Uint64(w.WithdrawalIndex) + index := hexutil.Uint64(w.Index) validatorIndex := hexutil.Uint64(w.ValidatorIndex) - address := common.BytesToAddress(w.ExecutionAddress) + address := common.BytesToAddress(w.Address) wei := new(big.Int).SetUint64(1000000000) amountWei := new(big.Int).Mul(new(big.Int).SetUint64(w.Amount), wei) return json.Marshal(withdrawalJSON{ @@ -188,9 +188,9 @@ func (w *Withdrawal) UnmarshalJSON(enc []byte) error { return errors.New("missing execution address") } *w = Withdrawal{} - w.WithdrawalIndex = uint64(*dec.Index) + w.Index = uint64(*dec.Index) w.ValidatorIndex = types.ValidatorIndex(*dec.Validator) - w.ExecutionAddress = dec.Address.Bytes() + w.Address = dec.Address.Bytes() wei := new(big.Int).SetUint64(1000000000) amountWei, err := hexutil.DecodeBig(dec.Amount) if err != nil { diff --git a/proto/engine/v1/json_marshal_unmarshal_test.go b/proto/engine/v1/json_marshal_unmarshal_test.go index 615d899fa030..8ed09ee27e35 100644 --- a/proto/engine/v1/json_marshal_unmarshal_test.go +++ b/proto/engine/v1/json_marshal_unmarshal_test.go @@ -397,13 +397,13 @@ func TestJsonMarshalUnmarshal(t *testing.T) { require.DeepEqual(t, want.MixDigest, payloadPb.MixDigest) require.DeepEqual(t, want.Nonce, payloadPb.Nonce) require.Equal(t, 2, len(payloadPb.Withdrawals)) - require.Equal(t, uint64(1), payloadPb.Withdrawals[0].WithdrawalIndex) + require.Equal(t, uint64(1), payloadPb.Withdrawals[0].Index) require.Equal(t, types.ValidatorIndex(1), payloadPb.Withdrawals[0].ValidatorIndex) - require.DeepEqual(t, bytesutil.PadTo([]byte("address1"), 20), payloadPb.Withdrawals[0].ExecutionAddress) + require.DeepEqual(t, bytesutil.PadTo([]byte("address1"), 20), payloadPb.Withdrawals[0].Address) require.Equal(t, uint64(1), payloadPb.Withdrawals[0].Amount) - require.Equal(t, uint64(2), payloadPb.Withdrawals[1].WithdrawalIndex) + require.Equal(t, uint64(2), payloadPb.Withdrawals[1].Index) require.Equal(t, types.ValidatorIndex(2), payloadPb.Withdrawals[1].ValidatorIndex) - require.DeepEqual(t, bytesutil.PadTo([]byte("address2"), 20), payloadPb.Withdrawals[1].ExecutionAddress) + require.DeepEqual(t, bytesutil.PadTo([]byte("address2"), 20), payloadPb.Withdrawals[1].Address) require.Equal(t, uint64(2), payloadPb.Withdrawals[1].Amount) }) }