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

API to enumerate executable program accounts in tx batch #30371

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented Feb 16, 2023

Problem

Missing code that can extract unique executable program accounts from a batch of transactions.

Summary of Changes

Add a new API to accounts that returns executable program accounts from a transaction batch.
Added unit tests for the API.

Fixes #

let mut result = HashMap::new();
lock_results.iter_mut().zip(txs).for_each(|etx| {
if let ((Ok(()), nonce), tx) = etx {
if nonce
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed, this filtering should be refactored out in a later PR as it is general step in transaction loading.

@pgarg66 pgarg66 merged commit 6c58033 into solana-labs:master Feb 16, 2023
@pgarg66 pgarg66 deleted the filter-program-accounts branch February 16, 2023 21:29
@Lichtso Lichtso mentioned this pull request Feb 23, 2023
14 tasks
nickfrosty pushed a commit to nickfrosty/solana that referenced this pull request Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants