mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Add post-merge test chain config
This commit is contained in:
parent
5a94a7725e
commit
61eb793205
2 changed files with 31 additions and 6 deletions
|
|
@ -1399,9 +1399,7 @@ func TestRPCGetBlockOrHeader(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func setupReceiptBackend(t *testing.T, genBlocks int) (*testBackend, []common.Hash) {
|
func setupReceiptBackend(t *testing.T, genBlocks int) (*testBackend, []common.Hash) {
|
||||||
config := *params.TestChainConfig
|
config := *params.MergedTestChainConfig
|
||||||
config.ShanghaiTime = new(uint64)
|
|
||||||
config.CancunTime = new(uint64)
|
|
||||||
var (
|
var (
|
||||||
acc1Key, _ = crypto.HexToECDSA("8a1f9a8f95be41cd7ccb6168179afb4504aefe388d1e14474d32c45c72ce7b7a")
|
acc1Key, _ = crypto.HexToECDSA("8a1f9a8f95be41cd7ccb6168179afb4504aefe388d1e14474d32c45c72ce7b7a")
|
||||||
acc2Key, _ = crypto.HexToECDSA("49a7b37aa6f6645917e7b807e9d1c00d4fa71f18343b0d4122a4d2df64dd6fee")
|
acc2Key, _ = crypto.HexToECDSA("49a7b37aa6f6645917e7b807e9d1c00d4fa71f18343b0d4122a4d2df64dd6fee")
|
||||||
|
|
@ -1432,9 +1430,6 @@ func setupReceiptBackend(t *testing.T, genBlocks int) (*testBackend, []common.Ha
|
||||||
txHashes = make([]common.Hash, genBlocks)
|
txHashes = make([]common.Hash, genBlocks)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Set the terminal total difficulty in the config
|
|
||||||
genesis.Config.TerminalTotalDifficulty = big.NewInt(0)
|
|
||||||
genesis.Config.TerminalTotalDifficultyPassed = true
|
|
||||||
backend := newTestBackend(t, genBlocks, genesis, beacon.New(ethash.NewFaker()), func(i int, b *core.BlockGen) {
|
backend := newTestBackend(t, genBlocks, genesis, beacon.New(ethash.NewFaker()), func(i int, b *core.BlockGen) {
|
||||||
var (
|
var (
|
||||||
tx *types.Transaction
|
tx *types.Transaction
|
||||||
|
|
|
||||||
|
|
@ -242,6 +242,36 @@ var (
|
||||||
Clique: nil,
|
Clique: nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MergedTestChainConfig contains every protocol change (EIPs) introduced
|
||||||
|
// and accepted by the Ethereum core developers for testing purposes.
|
||||||
|
MergedTestChainConfig = &ChainConfig{
|
||||||
|
ChainID: big.NewInt(1),
|
||||||
|
HomesteadBlock: big.NewInt(0),
|
||||||
|
DAOForkBlock: nil,
|
||||||
|
DAOForkSupport: false,
|
||||||
|
EIP150Block: big.NewInt(0),
|
||||||
|
EIP155Block: big.NewInt(0),
|
||||||
|
EIP158Block: big.NewInt(0),
|
||||||
|
ByzantiumBlock: big.NewInt(0),
|
||||||
|
ConstantinopleBlock: big.NewInt(0),
|
||||||
|
PetersburgBlock: big.NewInt(0),
|
||||||
|
IstanbulBlock: big.NewInt(0),
|
||||||
|
MuirGlacierBlock: big.NewInt(0),
|
||||||
|
BerlinBlock: big.NewInt(0),
|
||||||
|
LondonBlock: big.NewInt(0),
|
||||||
|
ArrowGlacierBlock: big.NewInt(0),
|
||||||
|
GrayGlacierBlock: big.NewInt(0),
|
||||||
|
MergeNetsplitBlock: big.NewInt(0),
|
||||||
|
ShanghaiTime: newUint64(0),
|
||||||
|
CancunTime: newUint64(0),
|
||||||
|
PragueTime: nil,
|
||||||
|
VerkleTime: nil,
|
||||||
|
TerminalTotalDifficulty: big.NewInt(0),
|
||||||
|
TerminalTotalDifficultyPassed: true,
|
||||||
|
Ethash: new(EthashConfig),
|
||||||
|
Clique: nil,
|
||||||
|
}
|
||||||
|
|
||||||
// NonActivatedConfig defines the chain configuration without activating
|
// NonActivatedConfig defines the chain configuration without activating
|
||||||
// any protocol change (EIPs).
|
// any protocol change (EIPs).
|
||||||
NonActivatedConfig = &ChainConfig{
|
NonActivatedConfig = &ChainConfig{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue