Skip to content

feat(rpc): unavailable pending data only errs when we actually depend on it#3469

Merged
t00ts merged 3 commits into
mainfrom
t00ts/rpc-pending-optional
Jun 10, 2026
Merged

feat(rpc): unavailable pending data only errs when we actually depend on it#3469
t00ts merged 3 commits into
mainfrom
t00ts/rpc-pending-optional

Conversation

@t00ts

@t00ts t00ts commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Added a PendingWatcher::get_optional(..) (sibling to the existing .get(..)) that will still surface Internal errors but will tolerate Unavailable by returning None. This allows any method that doesn't really need pending data to query it as optional and not fail.

I've applied the fix to:

  • get_events
  • get_transaction_*
  • trace_transaction

Closes #3455

@t00ts t00ts requested a review from a team as a code owner June 10, 2026 10:51
@t00ts t00ts force-pushed the t00ts/rpc-pending-optional branch from 1882d21 to 46cd7f4 Compare June 10, 2026 10:59
@t00ts t00ts changed the title feat(rpc): unavailable pending data should will only err when we actually depend on it feat(rpc): unavailable pending data only errs when we actually depend on it Jun 10, 2026
@t00ts t00ts merged commit 102c0f0 into main Jun 10, 2026
12 checks passed
@t00ts t00ts deleted the t00ts/rpc-pending-optional branch June 10, 2026 17:30
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.

fix(rpc): unavailable pending data should only surface as an error when the answer actually depends on pending data

3 participants