Skip to content

Adds StorableAccounts::account_for_geyser()#10352

Merged
brooksprumo merged 1 commit intoanza-xyz:masterfrom
brooksprumo:geyser/store-accounts-2
Feb 4, 2026
Merged

Adds StorableAccounts::account_for_geyser()#10352
brooksprumo merged 1 commit intoanza-xyz:masterfrom
brooksprumo:geyser/store-accounts-2

Conversation

@brooksprumo
Copy link
Copy Markdown

@brooksprumo brooksprumo commented Feb 3, 2026

Problem

Geyser account update notifications are sent out in Accounts::_store_accounts(). The fn is passed in a impl StorableAccounts, but the geyser notifications need a &AccountSharedData. Right now we have to make a new AccountSharedData just to take a reference and give it to geyser. We know for _store_accounts() that the underlying StorableAccounts will have AccountSharedDatas, so it would be better to get access to that directly.

Summary of Changes

Adds StorableAccounts::account_for_geyser(), which provides &AccountSharedData in its callback. This obviates the need for making a new AccountSharedData.

@brooksprumo brooksprumo self-assigned this Feb 3, 2026
@brooksprumo brooksprumo force-pushed the geyser/store-accounts-2 branch from 2f1cad6 to 8113e06 Compare February 3, 2026 19:26
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 20.58824% with 54 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.2%. Comparing base (b226b00) to head (32f5a85).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #10352     +/-   ##
=========================================
- Coverage    83.2%    83.2%   -0.1%     
=========================================
  Files         845      845             
  Lines      319740   319920    +180     
=========================================
+ Hits       266099   266238    +139     
- Misses      53641    53682     +41     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brooksprumo brooksprumo force-pushed the geyser/store-accounts-2 branch 3 times, most recently from 8d92a38 to 22086f5 Compare February 4, 2026 03:34
let transaction = transactions
.map(|txs| *txs.get(index).expect("txs must be present if provided"));
accounts.account(index, |account| {
let account_shared_data = account.take_account();
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

We now no longer need to call .take_account() to create an AccountSharedData.

@brooksprumo brooksprumo marked this pull request as ready for review February 4, 2026 05:38
@brooksprumo brooksprumo requested a review from roryharr February 4, 2026 05:38
roryharr
roryharr previously approved these changes Feb 4, 2026
@brooksprumo brooksprumo added this pull request to the merge queue Feb 4, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Feb 4, 2026
@brooksprumo
Copy link
Copy Markdown
Author

Had to rebase on latest master to resolve merge conflicts with #10343 (a field was renamed within partitioned epoch rewards). No other code changes were made.

@brooksprumo brooksprumo added this pull request to the merge queue Feb 4, 2026
Merged via the queue into anza-xyz:master with commit 3a253cc Feb 4, 2026
50 checks passed
@brooksprumo brooksprumo deleted the geyser/store-accounts-2 branch February 4, 2026 21:37
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.

3 participants