Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix unit tests #23

Merged
merged 13 commits into from
Jan 25, 2024
Merged

Conversation

memekas
Copy link

@memekas memekas commented Jan 17, 2024

No description provided.

@memekas memekas marked this pull request as ready for review January 22, 2024 14:11
if defaultGenesis.Config.PlanckBlock != nil {
t.Errorf("initial config should have PlanckBlock = nil, but instead PlanckBlock = %v", defaultGenesis.Config.PlanckBlock)
}
gHash := params.BSCGenesisHash
config := defaultGenesis.configOrDefault(gHash)

if config.ChainID.Cmp(params.MainnetChainConfig.ChainID) != 0 {
if config.ChainID.Cmp(params.BSCChainConfig.ChainID) != 0 {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefaultETHGenesisBlock() returned Config: params.MainnetChainConfig
But we comparing it with BSCChainConfig
Looks like better to choose one of them to mention

Copy link
Author

@memekas memekas Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied it from the BSC (link). They use the default ETH mainnet genesis block for this test. With the default BSC mainnet genesis block it doesn't work, test fails.

The test changes the config in the defaultGenesis.configOrDefault(gHash). And this new config is compared.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got you

@dmitry123 dmitry123 merged commit 08b5c06 into Asphere-xyz:feat/bas-upgrade Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants