Skip to content

Commit 8242da5

Browse files
committed
flamenco: correct return values for fd_instr_acc_is_writable_idx
1 parent ee02b32 commit 8242da5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/flamenco/runtime/info/fd_instr_info.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,12 @@ fd_instr_info_init_from_txn_instr( fd_instr_info_t * instr,
109109
fd_exec_txn_ctx_t * txn_ctx,
110110
fd_txn_instr_t const * txn_instr );
111111

112+
/* https://github.com/anza-xyz/solana-sdk/blob/589e6237f203c2719c300dc044f4e00f48e66a8f/message/src/versions/v0/loaded.rs#L152-L157 */
112113
FD_FN_PURE static inline int
113114
fd_instr_acc_is_writable_idx( fd_instr_info_t const * instr,
114115
ushort idx ) {
115116
if( FD_UNLIKELY( idx>=instr->acct_cnt ) ) {
116-
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
117+
return 0;
117118
}
118119

119120
return !!(instr->accounts[idx].is_writable);

0 commit comments

Comments
 (0)