Skip to content

Commit

Permalink
core/types: go generate (#27196)
Browse files Browse the repository at this point in the history
Fixes a discrepancy between source and generated files, which was introduced when ExcessDataGas was added in ethereum/go-ethereum#27046.
  • Loading branch information
ucwong authored and lai8983166 committed Jul 24, 2024
1 parent a39389f commit 786e4f1
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 6 deletions.
4 changes: 2 additions & 2 deletions core/txpool/txpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1661,8 +1661,8 @@ func TestUnderpricing(t *testing.T) {
blockchain := newTestBlockChain(1000000, statedb, new(event.Feed))

config := testTxPoolConfig
config.GlobalSlots = 2
config.GlobalQueue = 2
config.GlobalSlots = 16
config.GlobalQueue = 16

pool := NewTxPool(config, params.TestChainConfig, blockchain)
defer pool.Stop()
Expand Down
4 changes: 3 additions & 1 deletion core/types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ type Header struct {
BaseFee *big.Int `json:"baseFeePerGas" rlp:"optional"`

// ExcessDataGas was added by EIP-4844 and is ignored in legacy headers.
ExcessDataGas *big.Int `json:"excessDataGas" rlp:"optional"`
ExcessDataGas *big.Int `json:"excessDataGas" rlp:"optional"`
WithdrawalsHash *common.Hash

/*
TODO (MariusVanDerWijden) Add this field once needed
// Random was added during the merge and contains the BeaconState randomness
Expand Down
12 changes: 12 additions & 0 deletions core/types/gen_header_json.go

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

21 changes: 20 additions & 1 deletion core/types/gen_header_rlp.go

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

4 changes: 2 additions & 2 deletions internal/ethapi/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func TestEstimateGas(t *testing.T) {
Value: (*hexutil.Big)(big.NewInt(1000)),
},
expectErr: nil,
want: 21000,
want: 23289,
},
// simple transfer with insufficient funds on latest block
{
Expand All @@ -404,7 +404,7 @@ func TestEstimateGas(t *testing.T) {
blockNumber: rpc.LatestBlockNumber,
call: TransactionArgs{},
expectErr: nil,
want: 53000,
want: 53068,
},
}
for i, tc := range testSuite {
Expand Down

0 comments on commit 786e4f1

Please sign in to comment.