-
Notifications
You must be signed in to change notification settings - Fork 353
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
refactor(lightclient): removed the need for next stateInfo for valiadition #1467
refactor(lightclient): removed the need for next stateInfo for valiadition #1467
Conversation
#1406) Co-authored-by: keruch <[email protected]> Co-authored-by: zale144 <[email protected]> Co-authored-by: Daniel T <[email protected]> Co-authored-by: Omri <[email protected]> Co-authored-by: Sergi Rene <[email protected]> Co-authored-by: Itzhak Bokris <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1467 +/- ##
==========================================
- Coverage 22.69% 22.69% -0.01%
==========================================
Files 575 575
Lines 124579 124516 -63
==========================================
- Hits 28273 28257 -16
+ Misses 92528 92494 -34
+ Partials 3778 3765 -13 ☔ View full report in Codecov by Sentry. |
func (s *StateInfo) NextSequencerForHeight(height uint64) string { | ||
if height != s.GetLatestHeight() { | ||
return s.Sequencer | ||
} | ||
return s.NextProposer | ||
} | ||
|
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.
func (s *StateInfo) NextSequencerForHeight(height uint64) string { | |
if height != s.GetLatestHeight() { | |
return s.Sequencer | |
} | |
return s.NextProposer | |
} | |
func (s *StateInfo) Successor(height uint64) string { | |
if height != s.GetLatestHeight() { | |
return s.Sequencer | |
} | |
return s.NextProposer | |
} | |
Great job |
agree |
DRY out the validation methods into 2:
ValidateHeaderAgainstStateInfo
- validates LC updated against existing state infoValidateStateInfoAgainstConsensusStates
- validates State Info against existing consensus statesmain changes:
on
HandleMsgUpdateClient
on
SetCanonicalClient