8000 Fix panic in RPCSectorRoots by n8maninger · Pull Request #679 · SiaFoundation/hostd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix panic in RPCSectorRoots #679

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

Merged
merged 1 commit into from
May 21, 2025
Merged

Fix panic in RPCSectorRoots #679

merged 1 commit into from
May 21, 2025

Conversation

n8maninger
Copy link
Member

Closes #678

@n8maninger n8maninger self-assigned this May 21, 2025
@github-project-automation github-project-automation bot moved this to In Progress in Sia May 21, 2025
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a panic in the rpcSectorRoots handler by providing a descriptive error when the number of sector roots is inconsistent, and records the fix in a changeset.

  • Add detailed error to WriteResponseErr to avoid passing an undefined err
  • Refactor error handling in rpcSectorRoots
  • Add a .changeset entry for the fix

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
rhp/v2/rpc.go Replace generic err with a fmt.Errorf message and return it
.changeset/fixed_a_panic_in_rhp2_sector_roots_rpc.md Create a changeset entry documenting the panic fix

@n8maninger n8maninger merged commit f48e076 into master May 21, 2025
12 checks passed
@n8maninger n8maninger deleted the nate/fix-panic branch May 21, 2025 17:35
@github-project-automation github-project-automation bot moved this from In Progress to Done in Sia May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Hostd crashes with panic on rpcSectorRoots from specific peer
2 participants
0