nervosnetwork / ckb-light-client

CKB light client reference implementation
MIT License
14 stars 16 forks source link

fix: refresh last state even no proved state #176

Closed yangby-cryptape closed 7 months ago

yangby-cryptape commented 7 months ago

Description

I didn't write unit test in #172.

p.s. :cry: 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

codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/nervosnetwork/ckb-light-client/pull/176/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nervosnetwork) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/nervosnetwork/ckb-light-client/pull/176/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nervosnetwork) | `72.42% <100.00%> (+1.00%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nervosnetwork#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.