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