Closed yangby-cryptape closed 9 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
38aa9b2
) 71.05% compared to head (e7499f3
) 71.09%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Changes
In the following code:
https://github.com/nervosnetwork/ckb-light-client/blob/38aa9b200be7c6b96ded79bf3d2f84b157f2d230/src/protocols/light_client/peers.rs#L1606-L1608
min_filtered_block_number
is the last filtered block which has been synchronized.should_cached_check_point_index
is the index of the check point, which contains the next filtered block which will be synchronized.So, the it should be fixed with following patch:
See the following code:
https://github.com/nervosnetwork/ckb-light-client/blob/38aa9b200be7c6b96ded79bf3d2f84b157f2d230/src/protocols/light_client/peers.rs#L1141-L1143
At start, the check point index and the block number of it is
0, 0
.The following check point index and the block number of it are
1, 2000
,2, 4000
and son on.When the client want to synchronizes the block
2000
,the last check point should be0
.When the client want to synchronizes the block
2001
to4000
,the last check point should be1
.So, when client synchronizes the filtered block
number
, the check point should be:Changed some naming to make the names are more appropriate.