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

[Merged by Bors] - implement genesis config #3600

Closed
wants to merge 3 commits into from

Conversation

dshulyak
Copy link
Contributor

closes: #3505

config/genesis.go Outdated Show resolved Hide resolved
@@ -296,6 +299,31 @@ func (app *App) introduction() {

// Initialize sets up an exit signal, logging and checks the clock, returns error if clock is not in sync.
func (app *App) Initialize() (err error) {
// ensure all data folders exist
err = filesystem.ExistOrCreate(app.Config.DataDir())
Copy link
Contributor

Choose a reason for hiding this comment

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

for better usability maybe we should just go ahead to create the directory if it doesn't exist.

Copy link
Contributor Author

@dshulyak dshulyak Sep 29, 2022

Choose a reason for hiding this comment

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

but this function is creating a directory exactly in such case. did i miss your point?

Copy link
Contributor

Choose a reason for hiding this comment

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

lol. my bad.

the error msg is "ensure folders exist" which misled me and prolly the operator. but i guess it'll print filesystem error to give the operator more hint.

config/genesis.go Outdated Show resolved Hide resolved
GenesisTime: time.Now().Format(time.RFC3339),
},
}
require.ErrorContains(t, app.Initialize(), "tortoise")
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe you can start from DefaultTestConfig() and modify the genesis config and data dir so you don't hit the tortoise param error. see TestInitialize_BadTortoiseParams

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, slipped from my mind

}

require.ErrorContains(t, app.Initialize(), "tortoise")
require.ErrorContains(t, app.Initialize(), "tortoise")
Copy link
Contributor

Choose a reason for hiding this comment

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

double-whammy :P

@dshulyak
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request Sep 29, 2022
@bors
Copy link

bors bot commented Sep 29, 2022

try

Build succeeded:

@dshulyak
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Sep 29, 2022
@bors
Copy link

bors bot commented Sep 29, 2022

Build failed:

@dshulyak
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Sep 29, 2022
@bors
Copy link

bors bot commented Sep 29, 2022

Pull request successfully merged into develop.

Build succeeded:

@bors bors bot changed the title implement genesis config [Merged by Bors] - implement genesis config Sep 29, 2022
@bors bors bot closed this Sep 29, 2022
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.

cmd/node: configuration changes for genesis id
2 participants