@@ -819,31 +819,32 @@ impl Signer {
819
819
. remove_pending_block_validation ( & signer_sig_hash)
820
820
. unwrap_or_else ( |e| warn ! ( "{self}: Failed to remove pending block validation: {e:?}" ) ) ;
821
821
822
- let Some ( response) = block_response else {
823
- return ;
824
- } ;
825
- // Submit a proposal response to the .signers contract for miners
826
- info ! (
827
- "{self}: Broadcasting a block response to stacks node: {response:?}" ;
828
- ) ;
829
- let accepted = matches ! ( response, BlockResponse :: Accepted ( ..) ) ;
830
- match self
831
- . stackerdb
832
- . send_message_with_retry :: < SignerMessage > ( response. into ( ) )
833
- {
834
- Ok ( _) => {
835
- crate :: monitoring:: actions:: increment_block_responses_sent ( accepted) ;
836
- if let Ok ( Some ( block_info) ) = self
837
- . signer_db
838
- . block_lookup ( & block_validate_response. signer_signature_hash ( ) )
839
- {
840
- crate :: monitoring:: actions:: record_block_response_latency ( & block_info. block ) ;
822
+ if let Some ( response) = block_response {
823
+ // Submit a proposal response to the .signers contract for miners
824
+ info ! (
825
+ "{self}: Broadcasting a block response to stacks node: {response:?}" ;
826
+ ) ;
827
+ let accepted = matches ! ( response, BlockResponse :: Accepted ( ..) ) ;
828
+ match self
829
+ . stackerdb
830
+ . send_message_with_retry :: < SignerMessage > ( response. into ( ) )
831
+ {
832
+ Ok ( _) => {
833
+ crate :: monitoring:: actions:: increment_block_responses_sent ( accepted) ;
834
+ if let Ok ( Some ( block_info) ) = self
835
+ . signer_db
836
+ . block_lookup ( & block_validate_response. signer_signature_hash ( ) )
837
+ {
838
+ crate :: monitoring:: actions:: record_block_response_latency (
839
+ & block_info. block ,
840
+ ) ;
841
+ }
842
+ }
843
+ Err ( e) => {
844
+ warn ! ( "{self}: Failed to send block rejection to stacker-db: {e:?}" , ) ;
841
845
}
842
846
}
843
- Err ( e) => {
844
- warn ! ( "{self}: Failed to send block rejection to stacker-db: {e:?}" , ) ;
845
- }
846
- }
847
+ } ;
847
848
848
849
// Check if there is a pending block validation that we need to submit to the node
849
850
match self . signer_db . get_and_remove_pending_block_validation ( ) {
0 commit comments