Skip to content

v4.1: Bank::get_slot_history() is fallible (backport of #12598)#12628

Merged
brooksprumo merged 1 commit into
v4.1from
mergify/bp/v4.1/pr-12598
May 20, 2026
Merged

v4.1: Bank::get_slot_history() is fallible (backport of #12598)#12628
brooksprumo merged 1 commit into
v4.1from
mergify/bp/v4.1/pr-12598

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify Bot commented May 20, 2026

Problem

Bank::get_slot_history() double unwraps, which causes a panic on error. Instead, let the caller decide if this error is fatal or not.

Summary of Changes

  • Makes Bank::get_slot_history() return an Option
  • Updates callers to call .unwrap() (this maintains the current behavior--happy to adjust!)
  • Add a new RPC error
    This is an automatic backport of pull request Bank::get_slot_history() is fallible #12598 done by Mergify.

@mergify mergify Bot requested a review from a team as a code owner May 20, 2026 16:04
@mergify
Copy link
Copy Markdown
Author

mergify Bot commented May 20, 2026

If this PR represents a change to the public RPC API:

  1. Make sure it includes a complementary update to rpc-client/ (example)
  2. Open a follow-up PR to update the JavaScript client @solana/kit (example)

Thank you for keeping the RPC clients in sync with the server API @mergify[bot].

@steviez steviez requested a review from AshwinSekar May 20, 2026 16:06
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 20, 2026

Codecov Report

❌ Patch coverage is 52.63158% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.3%. Comparing base (da33332) to head (de60a56).

Additional details and impacted files
@@           Coverage Diff           @@
##             v4.1   #12628   +/-   ##
=======================================
  Coverage    83.3%    83.3%           
=======================================
  Files         851      851           
  Lines      324140   324149    +9     
=======================================
+ Hits       270041   270055   +14     
+ Misses      54099    54094    -5     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brooksprumo brooksprumo merged commit 7585b70 into v4.1 May 20, 2026
47 checks passed
@brooksprumo brooksprumo deleted the mergify/bp/v4.1/pr-12598 branch May 20, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants