@@ -663,7 +663,7 @@ fd_runtime_pre_execute_check( fd_exec_txn_ctx_t * txn_ctx ) {
663663 /* Regardless of whether transaction accounts were loaded successfully, the transaction is
664664 included in the block and transaction fees are collected.
665665 https://github.com/anza-xyz/agave/blob/v2.1.6/svm/src/transaction_processor.rs#L341-L357 */
666- txn_ctx -> flags |= FD_TXN_P_FLAGS_FEES_ONLY ;
666+ txn_ctx -> is_fees_only = 1 ;
667667
668668 /* If the transaction fails to load, the "rollback" accounts will include one of the following:
669669 1. Nonce account only
@@ -1045,6 +1045,7 @@ fd_runtime_prepare_and_execute_txn( fd_banks_t * banks,
10451045 ulong slot = fd_bank_slot_get ( bank );
10461046
10471047 /* Setup and execute the transaction. */
1048+ txn_ctx -> is_fees_only = 0 ;
10481049 txn_ctx -> bank = bank ;
10491050 txn_ctx -> slot = fd_bank_slot_get ( bank );
10501051 txn_ctx -> bank_idx = bank_idx ;
@@ -1055,7 +1056,7 @@ fd_runtime_prepare_and_execute_txn( fd_banks_t * banks,
10551056 txn_ctx -> exec_stack = exec_stack ;
10561057 txn_ctx -> dumping_mem = dumping_mem ;
10571058 txn_ctx -> tracing_mem = tracing_mem ;
1058- txn_ctx -> flags = FD_TXN_P_FLAGS_SANITIZE_SUCCESS ;
1059+ txn_ctx -> flags = FD_TXN_P_FLAGS_SANITIZE_SUCCESS | FD_TXN_P_FLAGS_EXECUTE_SUCCESS ;
10591060 fd_exec_txn_ctx_setup_basic ( txn_ctx );
10601061 txn_ctx -> capture_ctx = capture_ctx ;
10611062
@@ -1067,14 +1068,14 @@ fd_runtime_prepare_and_execute_txn( fd_banks_t * banks,
10671068
10681069 /* Pre-execution checks */
10691070 exec_res = fd_runtime_pre_execute_check ( txn_ctx );
1070- if ( FD_UNLIKELY ( !( txn_ctx -> flags & FD_TXN_P_FLAGS_SANITIZE_SUCCESS ) ) ) {
1071+
1072+ if ( FD_UNLIKELY ( exec_res != FD_RUNTIME_EXECUTE_SUCCESS && !txn_ctx -> is_fees_only ) ) {
10711073 return exec_res ;
10721074 }
10731075
10741076 /* Execute the transaction. Note that fees-only transactions are still
10751077 marked as "executed". */
1076- txn_ctx -> flags |= FD_TXN_P_FLAGS_EXECUTE_SUCCESS ;
1077- if ( FD_LIKELY ( !( txn_ctx -> flags & FD_TXN_P_FLAGS_FEES_ONLY ) ) ) {
1078+ if ( FD_LIKELY ( !txn_ctx -> is_fees_only ) ) {
10781079 exec_res = fd_execute_txn ( txn_ctx );
10791080 }
10801081
0 commit comments