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] - validate genesis before using #4719

Closed
wants to merge 2 commits into from

Conversation

zhiqiangxu
Copy link
Contributor

@zhiqiangxu zhiqiangxu commented Jul 18, 2023

Currently if run fastnet without specifying a genesis-time, will panic:

2023-07-18T10:02:33.246+0200	INFO	00000.defaultLogger	Looking for identity file at `/home/dd/post/data/key.bin`
panic: code should have run Validate before this method

node/node.go Outdated
if err := app.Config.Genesis.Validate(); err != nil {
return nil, fmt.Errorf("invalid genesis: %w", err)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

i think it is better to call Initialize before LoadOrCreateSigned in the GetCommand

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated accordingly.

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #4719 (4c36f41) into develop (b1b1b06) will decrease coverage by 0.1%.
The diff coverage is 0.0%.

@@            Coverage Diff            @@
##           develop   #4719     +/-   ##
=========================================
- Coverage     77.3%   77.3%   -0.1%     
=========================================
  Files          255     255             
  Lines        28683   28724     +41     
=========================================
+ Hits         22191   22213     +22     
- Misses        5115    5128     +13     
- Partials      1377    1383      +6     
Impacted Files Coverage Δ
node/node.go 65.6% <0.0%> (+<0.1%) ⬆️

... and 9 files with indirect coverage changes

@dshulyak
Copy link
Contributor

bors try

bors bot added a commit that referenced this pull request Jul 18, 2023
@bors
Copy link

bors bot commented Jul 18, 2023

try

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@dshulyak
Copy link
Contributor

bors merge

@bors
Copy link

bors bot commented Jul 18, 2023

👎 Rejected by too few approved reviews

Copy link
Contributor

@dshulyak dshulyak left a comment

Choose a reason for hiding this comment

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

bors merge

bors bot pushed a commit that referenced this pull request Jul 18, 2023
Currently if run `fastnet` without specifying a `genesis-time`, will panic:
```
2023-07-18T10:02:33.246+0200	INFO	00000.defaultLogger	Looking for identity file at `/home/dd/post/data/key.bin`
panic: code should have run Validate before this method
```
@bors
Copy link

bors bot commented Jul 18, 2023

Pull request successfully merged into develop.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title validate genesis before using [Merged by Bors] - validate genesis before using Jul 18, 2023
@bors bors bot closed this Jul 18, 2023
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

2 participants