@@ -25,6 +25,7 @@ use stacks_common::{debug, error, info, warn};
2525use crate :: chainstate:: SortitionsView ;
2626use crate :: client:: { retry_with_exponential_backoff, ClientError , StacksClient } ;
2727use crate :: config:: { GlobalConfig , SignerConfig , SignerConfigMode } ;
28+ use crate :: signerdb:: BlockInfo ;
2829use crate :: v0:: signer_state:: LocalStateMachine ;
2930#[ cfg( any( test, feature = "testing" ) ) ]
3031use crate :: v0:: tests:: TEST_SKIP_SIGNER_CLEANUP ;
@@ -59,6 +60,9 @@ pub struct StateInfo {
5960 pub signer_state_machines : Vec < ( u64 , Option < LocalStateMachine > ) > ,
6061 /// The number of pending block proposals for this signer
6162 pub pending_proposals_count : u64 ,
63+ /// The canonical tip block info according to the running signers
64+ /// as a pair of (reward-cycle, block-info)
65+ pub signer_canonical_tips : Vec < ( u64 , Option < BlockInfo > ) > ,
6266}
6367
6468/// The signer result that can be sent across threads
@@ -544,6 +548,16 @@ impl<Signer: SignerTrait<T>, T: StacksMessageCodec + Clone + Send + Debug>
544548 }
545549 } )
546550 . unwrap_or ( 0 ) ,
551+ signer_canonical_tips : self
552+ . stacks_signers
553+ . iter ( )
554+ . map ( |( reward_cycle, signer) | {
555+ let ConfiguredSigner :: RegisteredSigner ( ref signer) = signer else {
556+ return ( * reward_cycle, None ) ;
557+ } ;
558+ ( * reward_cycle, signer. get_canonical_tip ( ) )
559+ } )
560+ . collect ( ) ,
547561 } ;
548562 info ! ( "Signer status check requested: {state_info:?}" ) ;
549563
0 commit comments