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

basicchain: use UnitTestNet default config for generation #3696

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AliceInHunterland
Copy link
Contributor

@AliceInHunterland AliceInHunterland commented Nov 22, 2024

Some tests failing.
Close #3681

Tests should use embed config too.

Signed-off-by: Ekaterina Pavlova <[email protected]>
Close #3681

Signed-off-by: Ekaterina Pavlova <[email protected]>
@AliceInHunterland AliceInHunterland changed the title basicchain: use UnitTestNet default config basicchain: use UnitTestNet default config for generation Nov 22, 2024
@@ -272,7 +272,7 @@ func TestBlockchain_StartFromExistingDB(t *testing.T) {

_, _, _, err = chain.NewMultiWithCustomConfigAndStoreNoCheck(t, customConfig, cache)
require.Error(t, err)
require.True(t, strings.Contains(err.Error(), fmt.Sprintf("native %s: version mismatch for the latest hardfork Echidna (stored contract state differs from autogenerated one)", nativenames.CryptoLib)), err)
require.True(t, strings.Contains(err.Error(), fmt.Sprintf("native %s: version mismatch for the latest hardfork Default (stored contract state differs from autogenerated one)", nativenames.CryptoLib)), err)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AnnaShaleva it could be correct?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it's because you changed the node's fork scheduler.

require.True(t, ok)

assert.ElementsMatch(t, expected, *actual)
},
Copy link
Member

Choose a reason for hiding this comment

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

Useless change. And BTW, create an issue to enable this test, preview3 has passed long ago.

ValidatorsCount: 4,
VerifyTransactions: true,
},
cfg, err := config.Load(config.DefaultConfigPath, netmode.UnitTestNet)
Copy link
Member

Choose a reason for hiding this comment

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

It's not clear from the commit message what is the reason of the problem and why does this change solve it.

@@ -272,7 +272,7 @@ func TestBlockchain_StartFromExistingDB(t *testing.T) {

_, _, _, err = chain.NewMultiWithCustomConfigAndStoreNoCheck(t, customConfig, cache)
require.Error(t, err)
require.True(t, strings.Contains(err.Error(), fmt.Sprintf("native %s: version mismatch for the latest hardfork Echidna (stored contract state differs from autogenerated one)", nativenames.CryptoLib)), err)
require.True(t, strings.Contains(err.Error(), fmt.Sprintf("native %s: version mismatch for the latest hardfork Default (stored contract state differs from autogenerated one)", nativenames.CryptoLib)), err)
Copy link
Member

Choose a reason for hiding this comment

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

Yes, it's because you changed the node's fork scheduler.

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.

block20StateRootLE differ in basic chain generation and tests
2 participants