@@ -152,7 +152,7 @@ async fn retry_get_historical_price(
152
152
token. get_historical_price ( rpc_client, block_date) . await
153
153
}
154
154
155
- #[ derive( Default , Debug ) ]
155
+ #[ derive( Default , Debug , Clone , Copy ) ]
156
156
struct ComputeBudget {
157
157
compute_unit_price_micro_lamports : Option < u64 > ,
158
158
compute_unit_limit : Option < u32 > ,
@@ -3176,6 +3176,8 @@ async fn process_account_sweep<T: Signers>(
3176
3176
3177
3177
let ( signature, maybe_transaction) = match existing_signature {
3178
3178
None => {
3179
+ apply_compute_budget ( rpc_client, & mut instructions, compute_budget) ;
3180
+
3179
3181
let mut message = Message :: new ( & instructions, Some ( & from_authority_address) ) ;
3180
3182
message. recent_blockhash = recent_blockhash;
3181
3183
@@ -3193,8 +3195,6 @@ async fn process_account_sweep<T: Signers>(
3193
3195
println ! ( "TODO: account for priority fee in lot split..." ) ;
3194
3196
}
3195
3197
3196
- apply_compute_budget ( rpc_client, & mut instructions, compute_budget) ;
3197
-
3198
3198
let mut transaction = Transaction :: new_unsigned ( message) ;
3199
3199
let simulation_result = rpc_client. simulate_transaction ( & transaction) ?. value ;
3200
3200
if simulation_result. err . is_some ( ) {
0 commit comments