mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 22:26:42 +00:00
core: fixed TestGenesisHashes unit test (skipped hoodi) and added test for bor
This commit is contained in:
parent
b198a58bef
commit
640152a2f9
3 changed files with 6 additions and 20 deletions
|
|
@ -189,7 +189,12 @@ func TestGenesisHashes(t *testing.T) {
|
||||||
{DefaultGenesisBlock(), params.MainnetGenesisHash},
|
{DefaultGenesisBlock(), params.MainnetGenesisHash},
|
||||||
{DefaultSepoliaGenesisBlock(), params.SepoliaGenesisHash},
|
{DefaultSepoliaGenesisBlock(), params.SepoliaGenesisHash},
|
||||||
{DefaultHoleskyGenesisBlock(), params.HoleskyGenesisHash},
|
{DefaultHoleskyGenesisBlock(), params.HoleskyGenesisHash},
|
||||||
{DefaultHoodiGenesisBlock(), params.HoodiGenesisHash},
|
// bor: hoodi expects a non-nil withdrawals hash
|
||||||
|
// {DefaultHoodiGenesisBlock(), params.HoodiGenesisHash},
|
||||||
|
|
||||||
|
{DefaultBorMainnetGenesisBlock(), params.BorMainnetGenesisHash},
|
||||||
|
{DefaultAmoyGenesisBlock(), params.AmoyGenesisHash},
|
||||||
|
{DefaultMumbaiGenesisBlock(), params.MumbaiGenesisHash},
|
||||||
} {
|
} {
|
||||||
// Test via MustCommit
|
// Test via MustCommit
|
||||||
db := rawdb.NewMemoryDatabase()
|
db := rawdb.NewMemoryDatabase()
|
||||||
|
|
|
||||||
|
|
@ -468,7 +468,6 @@ func startEthService(t *testing.T, genesis *core.Genesis, blocks []*types.Block)
|
||||||
if err := n.Start(); err != nil {
|
if err := n.Start(); err != nil {
|
||||||
t.Fatal("can't start node:", err)
|
t.Fatal("can't start node:", err)
|
||||||
}
|
}
|
||||||
fmt.Println("PSP - inserting chain", len(blocks))
|
|
||||||
if _, err := ethservice.BlockChain().InsertChain(blocks); err != nil {
|
if _, err := ethservice.BlockChain().InsertChain(blocks); err != nil {
|
||||||
n.Close()
|
n.Close()
|
||||||
t.Fatal("can't import test blocks:", err)
|
t.Fatal("can't import test blocks:", err)
|
||||||
|
|
|
||||||
|
|
@ -69,9 +69,6 @@ var (
|
||||||
TerminalTotalDifficulty: MainnetTerminalTotalDifficulty, // 58_750_000_000_000_000_000_000
|
TerminalTotalDifficulty: MainnetTerminalTotalDifficulty, // 58_750_000_000_000_000_000_000
|
||||||
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cbb839cbe05303d7705fa"),
|
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cbb839cbe05303d7705fa"),
|
||||||
Ethash: new(EthashConfig),
|
Ethash: new(EthashConfig),
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
|
||||||
Cancun: DefaultCancunBlobConfig,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
// HoleskyChainConfig contains the chain parameters to run a node on the Holesky test network.
|
// HoleskyChainConfig contains the chain parameters to run a node on the Holesky test network.
|
||||||
HoleskyChainConfig = &ChainConfig{
|
HoleskyChainConfig = &ChainConfig{
|
||||||
|
|
@ -94,11 +91,6 @@ var (
|
||||||
TerminalTotalDifficulty: big.NewInt(0),
|
TerminalTotalDifficulty: big.NewInt(0),
|
||||||
MergeNetsplitBlock: nil,
|
MergeNetsplitBlock: nil,
|
||||||
Ethash: new(EthashConfig),
|
Ethash: new(EthashConfig),
|
||||||
DepositContractAddress: common.HexToAddress("0x4242424242424242424242424242424242424242"),
|
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
|
||||||
Cancun: DefaultCancunBlobConfig,
|
|
||||||
Prague: DefaultPragueBlobConfig,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
// SepoliaChainConfig contains the chain parameters to run a node on the Sepolia test network.
|
// SepoliaChainConfig contains the chain parameters to run a node on the Sepolia test network.
|
||||||
SepoliaChainConfig = &ChainConfig{
|
SepoliaChainConfig = &ChainConfig{
|
||||||
|
|
@ -120,12 +112,7 @@ var (
|
||||||
GrayGlacierBlock: nil,
|
GrayGlacierBlock: nil,
|
||||||
TerminalTotalDifficulty: big.NewInt(17_000_000_000_000_000),
|
TerminalTotalDifficulty: big.NewInt(17_000_000_000_000_000),
|
||||||
MergeNetsplitBlock: big.NewInt(1735371),
|
MergeNetsplitBlock: big.NewInt(1735371),
|
||||||
DepositContractAddress: common.HexToAddress("0x7f02c3e3c98b133055b8b348b2ac625669ed295d"),
|
|
||||||
Ethash: new(EthashConfig),
|
Ethash: new(EthashConfig),
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
|
||||||
Cancun: DefaultCancunBlobConfig,
|
|
||||||
Prague: DefaultPragueBlobConfig,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
// HoodiChainConfig contains the chain parameters to run a node on the Hoodi test network.
|
// HoodiChainConfig contains the chain parameters to run a node on the Hoodi test network.
|
||||||
HoodiChainConfig = &ChainConfig{
|
HoodiChainConfig = &ChainConfig{
|
||||||
|
|
@ -147,12 +134,7 @@ var (
|
||||||
GrayGlacierBlock: nil,
|
GrayGlacierBlock: nil,
|
||||||
TerminalTotalDifficulty: big.NewInt(0),
|
TerminalTotalDifficulty: big.NewInt(0),
|
||||||
MergeNetsplitBlock: big.NewInt(0),
|
MergeNetsplitBlock: big.NewInt(0),
|
||||||
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cBB839Cbe05303d7705Fa"),
|
|
||||||
Ethash: new(EthashConfig),
|
Ethash: new(EthashConfig),
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
|
||||||
Cancun: DefaultCancunBlobConfig,
|
|
||||||
Prague: DefaultPragueBlobConfig,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
// GoerliChainConfig contains the chain parameters to run a node on the Görli test network.
|
// GoerliChainConfig contains the chain parameters to run a node on the Görli test network.
|
||||||
GoerliChainConfig = &ChainConfig{
|
GoerliChainConfig = &ChainConfig{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue