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

Remove unnecessary cloning of transfer hook accounts #263

Conversation

acheroncrypto
Copy link
Contributor

Problem

transfer_hook_accounts are cloned and referenced immediately which wastes CU and memory unnecessarily:

&transfer_hook_accounts.clone().unwrap(),

&transfer_hook_accounts.clone().unwrap(),

Summary of changes

Remove unnecessary cloning of transfer hook accounts and reference them instead.

@yugure-orca
Copy link
Collaborator

@acheroncrypto
Thanks for this PR.
I'll merge this PR for next program upgrade.

Copy link
Collaborator

@yugure-orca yugure-orca left a comment

Choose a reason for hiding this comment

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

Looks good to me. (and passed test cases)

@yugure-orca yugure-orca merged commit 4684836 into orca-so:main Sep 3, 2024
6 checks passed
@CASABECI
Copy link

CASABECI commented Sep 6, 2024

Problem

transfer_hook_accounts are cloned and referenced immediately which wastes CU and memory unnecessarily:

&transfer_hook_accounts.clone().unwrap(),

&transfer_hook_accounts.clone().unwrap(),

Summary of changes

Remove unnecessary cloning of transfer hook accounts and reference them instead.

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