Skip to content

Commit

Permalink
core/beacon: correctly marshal block value
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden committed Jan 12, 2023
1 parent 9f463fe commit b89cfd0
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
46 changes: 46 additions & 0 deletions core/beacon/gen_edv2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions core/beacon/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,18 @@ type executableDataMarshaling struct {
Transactions []hexutil.Bytes
}

//go:generate go run github.com/fjl/gencodec -type ExecutableDataV2 -field-override executableDataV2Marshaling -out gen_edv2.go

type ExecutableDataV2 struct {
ExecutionPayload *ExecutableData `json:"executionPayload" gencodec:"required"`
BlockValue *big.Int `json:"blockValue" gencodec:"required"`
}

// JSON type overrides for ExecutableDataV2.
type executableDataV2Marshaling struct {
BlockValue *hexutil.Big
}

type PayloadStatusV1 struct {
Status string `json:"status"`
LatestValidHash *common.Hash `json:"latestValidHash"`
Expand Down

0 comments on commit b89cfd0

Please sign in to comment.