Skip to content

Commit

Permalink
core/types: make "miner" optional in Header JSON (#24666)
Browse files Browse the repository at this point in the history
"miner" is not set for pending block responses in some cases.

Fixes #24632
  • Loading branch information
fjl authored and unclezoro committed Sep 21, 2022
1 parent a41619f commit f37f2a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/types/block.go
Expand Up @@ -100,7 +100,7 @@ func (n *BlockNonce) UnmarshalText(input []byte) error {
type Header struct {
ParentHash common.Hash `json:"parentHash" gencodec:"required"`
UncleHash common.Hash `json:"sha3Uncles" gencodec:"required"`
Coinbase common.Address `json:"miner" gencodec:"required"`
Coinbase common.Address `json:"miner"`
Root common.Hash `json:"stateRoot" gencodec:"required"`
TxHash common.Hash `json:"transactionsRoot" gencodec:"required"`
ReceiptHash common.Hash `json:"receiptsRoot" gencodec:"required"`
Expand Down
9 changes: 4 additions & 5 deletions core/types/gen_header_json.go

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

0 comments on commit f37f2a9

Please sign in to comment.