-
Notifications
You must be signed in to change notification settings - Fork 42
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
fix unit tests #23
Conversation
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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got you
No description provided.