File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -339,11 +339,17 @@ impl Signer {
339
339
} ;
340
340
// Submit a proposal response to the .signers contract for miners
341
341
debug ! ( "{self}: Broadcasting a block response to stacks node: {block_response:?}" ) ;
342
- if let Err ( e) = self
342
+ let accepted = matches ! ( block_response, BlockResponse :: Accepted ( ..) ) ;
343
+ match self
343
344
. stackerdb
344
345
. send_message_with_retry :: < SignerMessage > ( block_response. into ( ) )
345
346
{
346
- warn ! ( "{self}: Failed to send block rejection to stacker-db: {e:?}" , ) ;
347
+ Ok ( _) => {
348
+ crate :: monitoring:: increment_block_responses_sent ( accepted) ;
349
+ }
350
+ Err ( e) => {
351
+ warn ! ( "{self}: Failed to send block rejection to stacker-db: {e:?}" , ) ;
352
+ }
347
353
}
348
354
return ;
349
355
}
@@ -612,12 +618,12 @@ impl Signer {
612
618
info ! (
613
619
"{self}: Broadcasting a block response to stacks node: {response:?}" ;
614
620
) ;
621
+ let accepted = matches ! ( response, BlockResponse :: Accepted ( ..) ) ;
615
622
match self
616
623
. stackerdb
617
- . send_message_with_retry :: < SignerMessage > ( response. clone ( ) . into ( ) )
624
+ . send_message_with_retry :: < SignerMessage > ( response. into ( ) )
618
625
{
619
626
Ok ( _) => {
620
- let accepted = matches ! ( response, BlockResponse :: Accepted ( ..) ) ;
621
627
crate :: monitoring:: increment_block_responses_sent ( accepted) ;
622
628
}
623
629
Err ( e) => {
You can’t perform that action at this time.
0 commit comments