@@ -25,6 +25,7 @@ use stacks_common::{debug, error, info, warn};
25
25
use crate :: chainstate:: SortitionsView ;
26
26
use crate :: client:: { retry_with_exponential_backoff, ClientError , StacksClient } ;
27
27
use crate :: config:: { GlobalConfig , SignerConfig , SignerConfigMode } ;
28
+ use crate :: signerdb:: BlockInfo ;
28
29
use crate :: v0:: signer_state:: LocalStateMachine ;
29
30
#[ cfg( any( test, feature = "testing" ) ) ]
30
31
use crate :: v0:: tests:: TEST_SKIP_SIGNER_CLEANUP ;
@@ -59,6 +60,9 @@ pub struct StateInfo {
59
60
pub signer_state_machines : Vec < ( u64 , Option < LocalStateMachine > ) > ,
60
61
/// The number of pending block proposals for this signer
61
62
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 > ) > ,
62
66
}
63
67
64
68
/// The signer result that can be sent across threads
@@ -544,6 +548,16 @@ impl<Signer: SignerTrait<T>, T: StacksMessageCodec + Clone + Send + Debug>
544
548
}
545
549
} )
546
550
. 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 ( ) ,
547
561
} ;
548
562
info ! ( "Signer status check requested: {state_info:?}" ) ;
549
563
0 commit comments