File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " pyth-agent"
3- version = " 2.3.0 "
3+ version = " 2.3.1 "
44edition = " 2021"
55
66[[bin ]]
Original file line number Diff line number Diff line change @@ -154,8 +154,8 @@ impl Default for Config {
154154 compute_unit_limit : 40000 ,
155155 compute_unit_price_micro_lamports : None ,
156156 dynamic_compute_unit_pricing_enabled : false ,
157- maximum_total_compute_fee_micro_lamports : 1_000_000_000_000 ,
158- maximum_slot_gap_for_dynamic_compute_unit_price : 25 ,
157+ maximum_total_compute_fee_micro_lamports : 100_000_000_000 ,
158+ maximum_slot_gap_for_dynamic_compute_unit_price : 30 ,
159159 }
160160 }
161161}
@@ -722,12 +722,20 @@ impl Exporter {
722722
723723 let result = result_rx. await ??;
724724
725- // Calculate the maximum slot difference between aggregate slot and
725+ // Calculate the maximum slot difference between the publisher latest slot and
726726 // current slot amongst all the accounts. Here, the aggregate slot is
727727 // used instead of the publishers latest update to avoid overpaying.
728728 let oldest_slot = result
729729 . values ( )
730- . map ( |account| account. last_slot )
730+ . flat_map ( |account| {
731+ account
732+ . comp
733+ . iter ( )
734+ . filter ( |c| c. publisher == publish_keypair. pubkey ( ) )
735+ . collect :: < Vec < _ > > ( )
736+ . get ( 0 )
737+ . map ( |c| c. latest . pub_slot )
738+ } )
731739 . min ( )
732740 . ok_or ( anyhow ! ( "No price accounts" ) ) ?;
733741
You can’t perform that action at this time.
0 commit comments