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 #176

Conversation

yangby-cryptape
Copy link
Collaborator

@yangby-cryptape yangby-cryptape commented Jan 9, 2024

Description

I didn't write unit test in #172.

p.s. 😢 Except that PR, I have written unit tests for almost all my PRs in this repo, since last year.

Sadly, It really doesn't work, just like Murphy's law said: Anything that can go wrong will go wrong.

That bugfix is incomplete.

This PR adds a unit test and fix it, again.

Commits

  • test: reproduce the bug the GetLastState wasn't sent sometimes when refresh peers
  • fix: refresh last state even no proved state (ref-commit: b95148c).

@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0a8c34a) 71.42% compared to head (030c0e4) 72.42%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #176      +/-   ##
===========================================
+ Coverage    71.42%   72.42%   +1.00%     
===========================================
  Files           25       25              
  Lines         6512     6513       +1     
===========================================
+ Hits          4651     4717      +66     
+ Misses        1861     1796      -65     
Flag Coverage Δ
unittests 72.42% <100.00%> (+1.00%) ⬆️

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 January 9, 2024 02:30
@quake quake merged commit 6182db4 into nervosnetwork:develop Jan 9, 2024
6 checks passed
@yangby-cryptape yangby-cryptape deleted the bugfix/refresh-last-state-even-no-proved-state branch January 9, 2024 06:20
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.

3 participants