File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
tip-router-operator-cli/src Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,6 @@ pub enum Commands {
273273 priority_fee_distribution_program_id : Pubkey ,
274274
275275 #[ arg( long, env) ]
276- epoch : u64 ,
276+ epoch : Option < u64 > ,
277277 } ,
278278}
Original file line number Diff line number Diff line change @@ -552,12 +552,20 @@ async fn main() -> Result<()> {
552552 priority_fee_distribution_program_id,
553553 epoch,
554554 } => {
555- info ! ( "Getting tip distribution stats for epoch {}..." , epoch) ;
555+ let stats_epoch = if let Some ( epoch) = epoch {
556+ epoch
557+ } else {
558+ rpc_client. get_epoch_info ( ) . await ?. epoch
559+ } ;
560+ info ! (
561+ "Getting tip distribution stats for epoch {}..." ,
562+ stats_epoch
563+ ) ;
556564 get_tip_distribution_stats (
557565 & rpc_client,
558566 & tip_distribution_program_id,
559567 & priority_fee_distribution_program_id,
560- epoch ,
568+ stats_epoch ,
561569 )
562570 . await ?;
563571 }
You can’t perform that action at this time.
0 commit comments