nervosnetwork / ckb-light-client

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

chore: only fetch blocks for filter matched #154

Closed quake closed 10 months ago

quake commented 10 months ago

light client will request blocks from full node when rpc fetch_header was called, I think it's unnecessary, it should be only requested for filter matched blocks.

codecov-commenter commented 10 months ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (578dcc6) 69.78% compared to head (8a06cab) 69.83%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #154 +/- ## =========================================== + Coverage 69.78% 69.83% +0.05% =========================================== Files 25 25 Lines 6395 6409 +14 =========================================== + Hits 4463 4476 +13 - Misses 1932 1933 +1 ``` | [Flag](https://app.codecov.io/gh/nervosnetwork/ckb-light-client/pull/154/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/154/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nervosnetwork) | `69.83% <100.00%> (+0.05%)` | :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. | [Files](https://app.codecov.io/gh/nervosnetwork/ckb-light-client/pull/154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nervosnetwork) | Coverage Δ | | |---|---|---| | [...ocols/light\_client/components/send\_blocks\_proof.rs](https://app.codecov.io/gh/nervosnetwork/ckb-light-client/pull/154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nervosnetwork#diff-c3JjL3Byb3RvY29scy9saWdodF9jbGllbnQvY29tcG9uZW50cy9zZW5kX2Jsb2Nrc19wcm9vZi5ycw==) | `94.28% <100.00%> (-0.65%)` | :arrow_down: | | [src/protocols/light\_client/mod.rs](https://app.codecov.io/gh/nervosnetwork/ckb-light-client/pull/154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nervosnetwork#diff-c3JjL3Byb3RvY29scy9saWdodF9jbGllbnQvbW9kLnJz) | `69.12% <100.00%> (ø)` | | | [src/protocols/light\_client/peers.rs](https://app.codecov.io/gh/nervosnetwork/ckb-light-client/pull/154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nervosnetwork#diff-c3JjL3Byb3RvY29scy9saWdodF9jbGllbnQvcGVlcnMucnM=) | `61.56% <100.00%> (+0.34%)` | :arrow_up: | | [src/utils/network.rs](https://app.codecov.io/gh/nervosnetwork/ckb-light-client/pull/154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nervosnetwork#diff-c3JjL3V0aWxzL25ldHdvcmsucnM=) | `92.95% <100.00%> (ø)` | |

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