tests: update for London (#22976)
This updates the tests submodule to the London fork tests, and also updates the test runner to support the new EIP-1559 fields in test JSON.
This commit is contained in:
committed by
GitHub
parent
08379b5533
commit
0e9c7d564d
@ -62,6 +62,7 @@ type Genesis struct {
|
||||
Number uint64 `json:"number"`
|
||||
GasUsed uint64 `json:"gasUsed"`
|
||||
ParentHash common.Hash `json:"parentHash"`
|
||||
BaseFee *big.Int `json:"baseFee"`
|
||||
}
|
||||
|
||||
// GenesisAlloc specifies the initial state that is part of the genesis block.
|
||||
@ -292,7 +293,11 @@ func (g *Genesis) ToBlock(db ethdb.Database) *types.Block {
|
||||
head.Difficulty = params.GenesisDifficulty
|
||||
}
|
||||
if g.Config != nil && g.Config.IsLondon(common.Big0) {
|
||||
head.BaseFee = new(big.Int).SetUint64(params.InitialBaseFee)
|
||||
if g.BaseFee != nil {
|
||||
head.BaseFee = g.BaseFee
|
||||
} else {
|
||||
head.BaseFee = new(big.Int).SetUint64(params.InitialBaseFee)
|
||||
}
|
||||
}
|
||||
statedb.Commit(false)
|
||||
statedb.Database().TrieDB().Commit(root, true, nil)
|
||||
|
Reference in New Issue
Block a user