core: fixed TestGenesisHashes unit test (skipped hoodi) and added test for bor

This commit is contained in:
Pratik Patil 2025-05-09 17:31:49 +05:30
parent b198a58bef
commit 640152a2f9
No known key found for this signature in database
GPG key ID: AFDCA496554874B3
3 changed files with 6 additions and 20 deletions

View file

@ -189,7 +189,12 @@ func TestGenesisHashes(t *testing.T) {
{DefaultGenesisBlock(), params.MainnetGenesisHash},
{DefaultSepoliaGenesisBlock(), params.SepoliaGenesisHash},
{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
db := rawdb.NewMemoryDatabase()

View file

@ -468,7 +468,6 @@ func startEthService(t *testing.T, genesis *core.Genesis, blocks []*types.Block)
if err := n.Start(); err != nil {
t.Fatal("can't start node:", err)
}
fmt.Println("PSP - inserting chain", len(blocks))
if _, err := ethservice.BlockChain().InsertChain(blocks); err != nil {
n.Close()
t.Fatal("can't import test blocks:", err)

View file

@ -69,9 +69,6 @@ var (
TerminalTotalDifficulty: MainnetTerminalTotalDifficulty, // 58_750_000_000_000_000_000_000
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cbb839cbe05303d7705fa"),
Ethash: new(EthashConfig),
BlobScheduleConfig: &BlobScheduleConfig{
Cancun: DefaultCancunBlobConfig,
},
}
// HoleskyChainConfig contains the chain parameters to run a node on the Holesky test network.
HoleskyChainConfig = &ChainConfig{
@ -94,11 +91,6 @@ var (
TerminalTotalDifficulty: big.NewInt(0),
MergeNetsplitBlock: nil,
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 = &ChainConfig{
@ -120,12 +112,7 @@ var (
GrayGlacierBlock: nil,
TerminalTotalDifficulty: big.NewInt(17_000_000_000_000_000),
MergeNetsplitBlock: big.NewInt(1735371),
DepositContractAddress: common.HexToAddress("0x7f02c3e3c98b133055b8b348b2ac625669ed295d"),
Ethash: new(EthashConfig),
BlobScheduleConfig: &BlobScheduleConfig{
Cancun: DefaultCancunBlobConfig,
Prague: DefaultPragueBlobConfig,
},
}
// HoodiChainConfig contains the chain parameters to run a node on the Hoodi test network.
HoodiChainConfig = &ChainConfig{
@ -147,12 +134,7 @@ var (
GrayGlacierBlock: nil,
TerminalTotalDifficulty: big.NewInt(0),
MergeNetsplitBlock: big.NewInt(0),
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cBB839Cbe05303d7705Fa"),
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 = &ChainConfig{