@@ -89,6 +89,7 @@ impl From<AlpenglowCommitmentError> for AddVoteError {
8989
9090#[ derive( Default ) ]
9191pub struct CertificatePool {
92+ my_pubkey : Pubkey ,
9293 // Vote pools to do bean counting for votes.
9394 vote_pools : BTreeMap < PoolId , VotePoolType > ,
9495 /// Completed certificates
@@ -131,6 +132,7 @@ impl CertificatePool {
131132 let parent_ready_tracker = ParentReadyTracker :: new ( my_pubkey, root_block) ;
132133
133134 let mut pool = Self {
135+ my_pubkey,
134136 vote_pools : BTreeMap :: new ( ) ,
135137 completed_certificates : BTreeMap :: new ( ) ,
136138 highest_notarized_fallback : None ,
@@ -322,6 +324,7 @@ impl CertificatePool {
322324 cert : Arc < CertificateMessage > ,
323325 events : & mut Vec < VotorEvent > ,
324326 ) {
327+ trace ! ( "{}: Inserting certificate {:?}" , self . my_pubkey, cert_id) ;
325328 self . completed_certificates . insert ( cert_id, cert) ;
326329 match cert_id {
327330 Certificate :: NotarizeFallback ( slot, block_id) => {
@@ -686,6 +689,7 @@ impl CertificatePool {
686689 /// This avoids the need to recreate the entire certificate pool since it's
687690 /// not distinguished by the pubkey.
688691 pub fn update_pubkey ( & mut self , new_pubkey : Pubkey ) {
692+ self . my_pubkey = new_pubkey;
689693 self . parent_ready_tracker . update_pubkey ( new_pubkey) ;
690694 }
691695
@@ -696,8 +700,9 @@ impl CertificatePool {
696700 pub fn get_certs_for_standstill ( & self ) -> Vec < Arc < CertificateMessage > > {
697701 self . completed_certificates
698702 . iter ( )
699- . filter_map ( |( _ , cert) | {
703+ . filter_map ( |( cert_id , cert) | {
700704 if Some ( cert. certificate . slot ( ) ) >= self . highest_finalized_with_notarize {
705+ trace ! ( "{}: Refreshing certificate {:?}" , self . my_pubkey, cert_id) ;
701706 Some ( cert. clone ( ) )
702707 } else {
703708 None
0 commit comments