@@ -65,11 +65,11 @@ fd_exec_txn_ctx_get_account_at_index( fd_exec_txn_ctx_t * ctx,
6565 ushort idx ,
6666 fd_txn_account_t * * account ,
6767 fd_txn_account_condition_fn_t * condition ) {
68- if ( FD_UNLIKELY ( idx >=ctx -> accounts_cnt ) ) {
68+ if ( FD_UNLIKELY ( idx >=ctx -> accounts . accounts_cnt ) ) {
6969 return FD_ACC_MGR_ERR_UNKNOWN_ACCOUNT ;
7070 }
7171
72- fd_txn_account_t * txn_account = & ctx -> accounts [idx ];
72+ fd_txn_account_t * txn_account = & ctx -> accounts . accounts [idx ];
7373 * account = txn_account ;
7474
7575 if ( FD_LIKELY ( condition != NULL ) ) {
@@ -112,9 +112,9 @@ fd_exec_txn_ctx_get_executable_account( fd_exec_txn_ctx_t * ctx,
112112 return FD_ACC_MGR_SUCCESS ;
113113 }
114114
115- for ( ushort i = 0 ; i < ctx -> executable_cnt ; i ++ ) {
116- if ( memcmp ( pubkey -> uc , ctx -> executable_accounts [i ].pubkey -> uc , sizeof (fd_pubkey_t ) )== 0 ) {
117- fd_txn_account_t * txn_account = & ctx -> executable_accounts [i ];
115+ for ( ushort i = 0 ; i < ctx -> accounts . executable_cnt ; i ++ ) {
116+ if ( memcmp ( pubkey -> uc , ctx -> accounts . accounts [i ].pubkey -> uc , sizeof (fd_pubkey_t ) )== 0 ) {
117+ fd_txn_account_t * txn_account = & ctx -> accounts . accounts [i ];
118118 * account = txn_account ;
119119
120120 if ( FD_LIKELY ( condition != NULL ) ) {
@@ -136,20 +136,20 @@ fd_exec_txn_ctx_get_key_of_account_at_index( fd_exec_txn_ctx_t * ctx,
136136 fd_pubkey_t const * * key ) {
137137 /* Return a NotEnoughAccountKeys error if idx is out of bounds.
138138 https://github.com/anza-xyz/agave/blob/v2.1.14/sdk/src/transaction_context.rs#L218 */
139- if ( FD_UNLIKELY ( idx >=ctx -> accounts_cnt ) ) {
139+ if ( FD_UNLIKELY ( idx >=ctx -> accounts . accounts_cnt ) ) {
140140 return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS ;
141141 }
142142
143- * key = & ctx -> account_keys [ idx ];
143+ * key = & ctx -> accounts . account_keys [ idx ];
144144 return FD_EXECUTOR_INSTR_SUCCESS ;
145145}
146146
147147void
148148fd_exec_txn_ctx_setup_basic ( fd_exec_txn_ctx_t * ctx ) {
149149 fd_compute_budget_details_new ( & ctx -> compute_budget_details );
150150 ctx -> instr_stack_sz = 0 ;
151- ctx -> accounts_cnt = 0UL ;
152- ctx -> executable_cnt = 0UL ;
151+ ctx -> accounts . accounts_cnt = 0UL ;
152+ ctx -> accounts . executable_cnt = 0UL ;
153153 ctx -> programs_to_reverify_cnt = 0UL ;
154154
155155 ctx -> loaded_accounts_data_size = 0UL ;
@@ -213,10 +213,10 @@ fd_txn_account_has_bpf_loader_upgradeable( const fd_pubkey_t * account_keys,
213213 https://github.com/anza-xyz/agave/blob/v2.1.11/sdk/program/src/message/sanitized.rs#L38-L47 */
214214int
215215fd_exec_txn_ctx_account_is_writable_idx ( fd_exec_txn_ctx_t const * txn_ctx , ushort idx ) {
216- uint bpf_upgradeable = fd_txn_account_has_bpf_loader_upgradeable ( txn_ctx -> account_keys , txn_ctx -> accounts_cnt );
216+ uint bpf_upgradeable = fd_txn_account_has_bpf_loader_upgradeable ( txn_ctx -> accounts . account_keys , txn_ctx -> accounts . accounts_cnt );
217217 return fd_exec_txn_account_is_writable_idx_flat ( fd_bank_slot_get ( txn_ctx -> bank ),
218218 idx ,
219- & txn_ctx -> account_keys [idx ],
219+ & txn_ctx -> accounts . account_keys [idx ],
220220 TXN ( & txn_ctx -> txn ),
221221 fd_bank_features_query ( txn_ctx -> bank ),
222222 bpf_upgradeable );
0 commit comments