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

refactor: new load_transaction_account function #2574

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

jstarry
Copy link

@jstarry jstarry commented Aug 13, 2024

Problem

fn load_transaction_accounts is too big and takes too many arguments

Summary of Changes

  • Split out a new load_transaction_account function
  • Introduce a new LoadedTransactionAccount struct for representing loaded account details

Fixes #

@jstarry jstarry force-pushed the refactor/load-transaction-account branch from c2d44d9 to baa96d1 Compare August 14, 2024 00:56
@jstarry jstarry requested a review from apfitzge August 14, 2024 01:13
};

collect_account(key, account_size, account, rent, account_found)?;
let loaded_account = load_transaction_account(

Choose a reason for hiding this comment

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

It seems a odd for this to take account_found as a mutable instead of returning a tuple (loaded_account, account_found). If I'm missing some context on the choice lmk.

Copy link
Author

Choose a reason for hiding this comment

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

Hmm not sure why I decided to that, switching to return a tuple as you suggested.

@jstarry jstarry merged commit de4cb11 into anza-xyz:master Aug 14, 2024
41 checks passed
ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
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.

2 participants