Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHIA-1717 Handle index error on empty peers with peak in request_validate_wp #18830

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AmineKhaldi
Copy link
Contributor

Purpose:

This addresses Error with syncing: <class 'IndexError'> and specifically IndexError: Cannot choose from an empty sequence on weight_proof_peer: WSChiaConnection = random.choice(peers_with_peak).

Current Behavior:

request_validate_wp doesn't handle this exception.

New Behavior:

request_validate_wp handles this exception with a proper runtime error.

@AmineKhaldi AmineKhaldi added Changed Required label for PR that categorizes merge commit message as "Changed" for changelog Cleanup Code cleanup labels Nov 6, 2024
@AmineKhaldi AmineKhaldi self-assigned this Nov 6, 2024
@AmineKhaldi AmineKhaldi marked this pull request as ready for review November 6, 2024 15:32
@AmineKhaldi AmineKhaldi requested a review from a team as a code owner November 6, 2024 15:32
Copy link

Pull Request Test Coverage Report for Build 11701745954

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.

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • 10 unchanged lines in 6 files lost coverage.
  • Overall coverage increased (+0.01%) to 90.917%

Files with Coverage Reduction New Missed Lines %
chia/_tests/simulation/test_simulation.py 1 96.45%
chia/server/server.py 1 81.84%
chia/full_node/full_node.py 1 86.35%
chia/server/node_discovery.py 2 81.28%
chia/data_layer/data_layer.py 2 86.09%
chia/_tests/core/daemon/test_daemon.py 3 99.59%
Totals Coverage Status
Change from base Build 11691476343: 0.01%
Covered Lines: 102805
Relevant Lines: 112849

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changed Required label for PR that categorizes merge commit message as "Changed" for changelog Cleanup Code cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants