Skip to content

Conversation

@two-heart
Copy link
Contributor

the same condition removed from fd_borrowed_account_is_writable is checked in fd_instr_acc_is_writable_idx

the same condition removed from fd_borrowed_account_is_writable is checked in fd_instr_acc_is_writable_idx
@two-heart two-heart force-pushed the rm-dup-writeable-check branch from 2f8e78e to 5c81587 Compare January 5, 2026 19:20
Copy link
Contributor

@intrigus-lgtm intrigus-lgtm left a comment

Choose a reason for hiding this comment

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

The implementation doesn't closely follow the updated permalink.

Agave has refactored the code such that a borrowed account now directly references an instruction account: https://github.com/anza-xyz/agave/blob/6dcc39fcba90fbb5c924c71a1ef287c234f56c17/transaction-context/src/lib.rs#L725, meaning that a call to fd_instr_acc_is_writable_idx is unnecessary now and instead a simple access to self.instruction_account.is_signer() suffices.

IMHO, we should either fully follow the changes agave did or none, but not a mix.
If we want to go through with the PR as-is, then we should also remove the duplicated check from fd_borrowed_account_is_signer.

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