chia-blockchain
chia-blockchain copied to clipboard
refactor new_peak_timelord
Purpose:
improving the flow that handles a new peak
Current Behavior:
we would skip a new peak for the wrong condition in some edge cases we would also handle peaks we should skip
New Behavior:
skip less heavy peaks even if we dont have unfinished blocks in the cache
Testing Notes:
added a test case for receiving a less heavy peak while we dont have unfinished blocks in the cache
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
Pull Request Test Coverage Report for Build 8144610631
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 195 of 200 (97.5%) changed or added relevant lines in 5 files are covered.
- 1481 unchanged lines in 65 files lost coverage.
- Overall coverage increased (+0.3%) to 91.165%
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
---|---|---|---|
chia/simulator/block_tools.py | 4 | 5 | 80.0% |
tests/blockchain/test_blockchain.py | 5 | 6 | 83.33% |
tests/timelord/test_new_peak.py | 158 | 161 | 98.14% |
<!-- | Total: | 195 | 200 |
Files with Coverage Reduction | New Missed Lines | % |
---|---|---|
chia/consensus/block_record.py | 1 | 95.24% |
chia/daemon/client.py | 1 | 84.38% |
chia/daemon/keychain_proxy.py | 1 | 64.98% |
chia/daemon/server.py | 1 | 88.56% |
chia/farmer/farmer.py | 1 | 72.67% |
chia/full_node/mempool.py | 1 | 99.66% |
chia/rpc/rpc_client.py | 1 | 98.91% |
chia/server/server.py | 1 | 81.12% |
chia/util/json_util.py | 1 | 88.46% |
chia/wallet/db_wallet/db_wallet_puzzles.py | 1 | 98.44% |
<!-- | Total: | 1481 |
Totals | |
---|---|
Change from base Build 7830053184: | 0.3% |
Covered Lines: | 97886 |
Relevant Lines: | 107364 |
💛 - Coveralls
This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
File | Coverage | Missing Lines |
---|---|---|
chia/_tests/timelord/test_new_peak.py |
98.1% | lines 357, 365-366 |
chia/simulator/block_tools.py |
80.0% | lines 1096 |
Total | Missing | Coverage |
---|---|---|
199 lines | 4 lines | 97% |
This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.
coverage exemption
Last CI run is stale, going to close and re-open to run again.
Please check the latest CI run. Some seemingly non-flakey failed jobs. As an aside, this PR was fairly clearly stale and imo should not have been approved without a new CI run. @almogdepaz @emlowe FYI
File | Coverage | Missing Lines |
---|---|---|
chia/_tests/timelord/test_new_peak.py |
98.1% | lines 357, 365-366 |
chia/simulator/block_tools.py |
80.0% | lines 1073 |
Total | Missing | Coverage |
---|---|---|
200 lines | 4 lines | 98% |