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

Fix network validation during database upgrade case. #856

Merged
merged 2 commits into from
Jan 31, 2022
Merged

Conversation

shiqizng
Copy link
Contributor

Summary

This PR fixes the following issue received during 2.8.3 indexer upgrade,
{"error":"unable to fetch network state from db GetNetworkState() err: accounting not initialized","level":"error","msg":"importer.EnsureInitialImport() error","time":"2022-01-31T01:35:47Z"}
NetworkMetaStateKey is a new addition to metastate table. So, it needs to be set when it returns GetNetworkState() returns ErrorNotInitialized.

Test Plan

Integration test is updated to validate that when network metadata is correctly initialized before GetNetworkState() calls.

@shiqizng shiqizng requested a review from winder January 31, 2022 18:52
@shiqizng shiqizng self-assigned this Jan 31, 2022
@shiqizng shiqizng added Team Lamprey bug Something isn't working labels Jan 31, 2022
@shiqizng shiqizng changed the title fix network check bug fix network check Jan 31, 2022
importer/helper.go Outdated Show resolved Hide resolved
@winder winder changed the title fix network check Fix network validation during database upgrade case. Jan 31, 2022
@winder winder merged commit 455ef3e into develop Jan 31, 2022
@winder winder deleted the shiqi/fix branch January 31, 2022 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Team Lamprey
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants