Closed yangby-cryptape closed 2 years ago
Base: 76.75% // Head: 75.99% // Decreases project coverage by -0.76%
:warning:
Coverage data is based on head (
72ac841
) compared to base (d1e670d
). Patch coverage: 31.88% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Issue
Assume the environment is as following:
0~4
are[1, 10, 20, 30, 40]
and for blocks5~9
are[45, 46, 70, 80, 90]
.10
.last-n-blocks
is3
.60
.[10, 20, 30, 50, 51, 52]
.So the server should reply proof for blocks
[1, 2, 3, 7, 8, 9]
to the client.But the client will raise an error because there is no matched block for
50
and50
is not in the difficulty range of those continuous blocks.How to Fix
Before this PR, the check for difficulties without matched blocks is:
After this PR, change the check to be:
Commits
p.s. Review the last commit first is easier because the code for fix is only 1 lines, half code for logs and others for a test.