-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add startup check to verify existing DB data matches the algod network. #833
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #833 +/- ##
===========================================
+ Coverage 59.17% 59.22% +0.04%
===========================================
Files 32 32
Lines 4108 4137 +29
===========================================
+ Hits 2431 2450 +19
- Misses 1379 1384 +5
- Partials 298 303 +5
Continue to review full report at Codecov.
|
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.
Is network ID enough? There might be some other parameters. Why not use the genesis hash?
genesis hash isn't in bookkeeping.Genesis struct and so the hash is not available in LoadGenesis(genesis bookkeeping.Genesis). Maybe it's better to use Genesis.ID()?
|
Seems like there is infrastructure for hashing |
I changed the check to use genesis hash. I removed network ID check since the hash includes the ID also. |
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.
LGTM
Summary
Write and check genesis hash during db load genesis.
Test Plan
Add a test to postgres_integration_test