Skip to content

Commit

Permalink
params/types/genesisT: omitempty tags for optional genesis fields
Browse files Browse the repository at this point in the history
These fields are not supported by all
chains which core-geth supports.
Since chain config data types omit empty values,
it follows that genesis ought follow suit.

Date: 2023-09-04 08:38:51-06:00
Signed-off-by: meows <[email protected]>
  • Loading branch information
meowsbits committed Sep 4, 2023
1 parent aed8d64 commit 1433432
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions params/types/genesisT/gen_genesis.go

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

6 changes: 3 additions & 3 deletions params/types/genesisT/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ type Genesis struct {
Number uint64 `json:"number"`
GasUsed uint64 `json:"gasUsed"`
ParentHash common.Hash `json:"parentHash"`
BaseFee *big.Int `json:"baseFeePerGas"` // EIP-1559
ExcessBlobGas *uint64 `json:"excessBlobGas"` // EIP-4844
BlobGasUsed *uint64 `json:"blobGasUsed"` // EIP-4844
BaseFee *big.Int `json:"baseFeePerGas,omitempty"` // EIP-1559
ExcessBlobGas *uint64 `json:"excessBlobGas,omitempty"` // EIP-4844
BlobGasUsed *uint64 `json:"blobGasUsed,omitempty"` // EIP-4844
}

func (g *Genesis) GetElasticityMultiplier() uint64 {
Expand Down

0 comments on commit 1433432

Please sign in to comment.