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

harness: Clone accounts from transaction context instead of take #80

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

febo
Copy link
Contributor

@febo febo commented Jan 15, 2025

Problem

When accounts are updated using the resulting accounts, accounts are taken from the transaction_context leaving an Account::default() on its place. When an instruction has multiple entries of the same account, the remaining "copies" of the account is updated with a default value.

Solution

Replace the use of take() by borrow().clone(), so the correct value can be used for the remaining "copies" of the same account.

@buffalojoec buffalojoec added the v2.0 Backport to solana-v2.0 label Jan 15, 2025
@buffalojoec buffalojoec merged commit ed4689c into anza-xyz:main Jan 15, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.0 Backport to solana-v2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants