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: refresh last state even no proved state #172

Conversation

yangby-cryptape
Copy link
Collaborator

@yangby-cryptape yangby-cryptape commented Dec 29, 2023

Description

Currently, the light client only refreshes the last state after it has a proved last state.
But, if it has sent a worse state to the light client (worse than saved state), the light client won't ask its last state proof.

The light client should ask it for a new last state.

@codecov-commenter
Copy link

codecov-commenter commented Dec 29, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (be21607) 71.43% compared to head (ef511bd) 71.42%.

Files Patch % Lines
src/protocols/light_client/peers.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #172      +/-   ##
===========================================
- Coverage    71.43%   71.42%   -0.02%     
===========================================
  Files           25       25              
  Lines         6511     6512       +1     
===========================================
  Hits          4651     4651              
- Misses        1860     1861       +1     
Flag Coverage Δ
unittests 71.42% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yangby-cryptape yangby-cryptape marked this pull request as ready for review December 29, 2023 17:18
quake
quake previously approved these changes Dec 30, 2023
@quake quake merged commit b95148c into nervosnetwork:develop Dec 30, 2023
6 checks passed
@yangby-cryptape yangby-cryptape deleted the bugfix/refresh-last-state-even-no-proved-state branch December 30, 2023 10:00
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.

4 participants