-
Notifications
You must be signed in to change notification settings - Fork 201
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
Genesis accounts with esdt balances #5871
Genesis accounts with esdt balances #5871
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## feat/chain-go-sdk #5871 +/- ##
=====================================================
+ Coverage 79.38% 79.41% +0.02%
=====================================================
Files 790 789 -1
Lines 98473 98514 +41
=====================================================
+ Hits 78176 78231 +55
+ Misses 14817 14803 -14
Partials 5480 5480 ☔ View full report in Codecov by Sentry. |
@@ -55,8 +62,27 @@ func (gbc *sovereignGenesisBlockCreator) CreateGenesisBlocks() (map[uint32]data. | |||
return gbc.createSovereignHeaders(argsCreateBlock) | |||
} | |||
|
|||
func (gbc *sovereignGenesisBlockCreator) initGenesisAccounts() error { | |||
acc, err := gbc.arg.Accounts.LoadAccount(core.SystemAccountAddress) |
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.
why are you loading and saving the same accounts without any changes ?
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.
This is mandatory at genesis to have accounts initialized.
@@ -77,6 +103,12 @@ func (gbc *sovereignGenesisBlockCreator) createSovereignEmptyGenesisBlocks() (ma | |||
return mapEmptyGenesisBlocks, nil | |||
} | |||
|
|||
func createSovereignGenesisConfig() config.EnableEpochs { | |||
cfg := createGenesisConfig() | |||
cfg.ESDTMultiTransferEnableEpoch = 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.
I think we could return error if the config is wrong. instead of setting it to 0 here.
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.
This is not the loaded config from config.toml.
This is a "mocked" created config for sovereign bootStrapping at genesis.
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.
When we'll make the chain start correctly with every flag on epoch 0, we should also change this mocked config to return everything with enable epoch 0 as well
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.
Will add a task for this
…esdt-tokens # Conflicts: # genesis/process/sovereignGenesisBlockCreator.go # genesis/process/sovereignGenesisBlockCreator_test.go
Reasoning behind the pull request
deposit
identifier from main chainProposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?