Closed yangby-cryptape closed 8 months ago
Attention: 8 lines
in your changes are missing coverage. Please review.
Comparison is base (
86865db
) 71.39% compared to head (b553660
) 71.37%.
Files | Patch % | Lines |
---|---|---|
src/protocols/light_client/peers.rs | 42.85% | 8 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
If a peer sent the same state to light client again and again, light client should ban it.
Just let the light client don't update the update timestamp for cached last-state if it isn't changed, and ban the peer when do timeout checks.
https://github.com/nervosnetwork/ckb-light-client/blob/86865dbb450753e73c5755a75e52b779231a3114/src/protocols/light_client/mod.rs#L502-L507
https://github.com/nervosnetwork/ckb-light-client/blob/86865dbb450753e73c5755a75e52b779231a3114/src/protocols/mod.rs#L25-L26
Commits: