mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
genesis: set ExcessBlobGas with warning to pass tests
This commit is contained in:
parent
c997eced29
commit
a013a60b81
3 changed files with 8 additions and 1 deletions
|
|
@ -514,6 +514,11 @@ func (g *Genesis) toBlockWithRoot(root common.Hash) *types.Block {
|
||||||
if head.BlobGasUsed == nil {
|
if head.BlobGasUsed == nil {
|
||||||
head.BlobGasUsed = new(uint64)
|
head.BlobGasUsed = new(uint64)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if g.ExcessBlobGas != nil {
|
||||||
|
log.Warn("Invalid genesis, unexpected ExcessBlobGas set before Cancun, allowing it for testing purposes")
|
||||||
|
head.ExcessBlobGas = g.ExcessBlobGas
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if conf.IsPrague(num, g.Timestamp) {
|
if conf.IsPrague(num, g.Timestamp) {
|
||||||
head.RequestsHash = &types.EmptyRequestsHash
|
head.RequestsHash = &types.EmptyRequestsHash
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,9 @@ func TestExecutionSpecBlocktests(t *testing.T) {
|
||||||
}
|
}
|
||||||
bt := new(testMatcher)
|
bt := new(testMatcher)
|
||||||
|
|
||||||
|
// These tests require us to handle scenarios where a system contract is not deployed at a fork
|
||||||
bt.skipLoad(".*prague/eip7251_consolidations/contract_deployment/test_system_contract_deployment.json")
|
bt.skipLoad(".*prague/eip7251_consolidations/contract_deployment/test_system_contract_deployment.json")
|
||||||
|
bt.skipLoad(".*prague/eip7251_consolidations/test_system_contract_deployment.json")
|
||||||
bt.skipLoad(".*prague/eip7002_el_triggerable_withdrawals/contract_deployment/test_system_contract_deployment.json")
|
bt.skipLoad(".*prague/eip7002_el_triggerable_withdrawals/contract_deployment/test_system_contract_deployment.json")
|
||||||
bt.skipLoad(".*prague/eip7002_el_triggerable_withdrawals/test_system_contract_deployment.json")
|
bt.skipLoad(".*prague/eip7002_el_triggerable_withdrawals/test_system_contract_deployment.json")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ func TestExecutionSpecTransaction(t *testing.T) {
|
||||||
st := new(testMatcher)
|
st := new(testMatcher)
|
||||||
|
|
||||||
// Emptiness of authorization list is only validated during the tx precheck
|
// Emptiness of authorization list is only validated during the tx precheck
|
||||||
st.skipLoad("^prague/eip7702_set_code_tx/empty_authorization_list.json")
|
st.skipLoad("^prague/eip7702_set_code_tx/test_empty_authorization_list.json")
|
||||||
|
|
||||||
st.walk(t, executionSpecTransactionTestDir, func(t *testing.T, name string, test *TransactionTest) {
|
st.walk(t, executionSpecTransactionTestDir, func(t *testing.T, name string, test *TransactionTest) {
|
||||||
if err := st.checkFailure(t, test.Run()); err != nil {
|
if err := st.checkFailure(t, test.Run()); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue