@@ -394,8 +394,8 @@ async def connection_lost(self):
394394 wid = getattr (self , "_worker_id" , None )
395395 if wid :
396396 hashrate_tracker .remove_worker (wid )
397- except Exception :
398- pass
397+ except Exception as e :
398+ self . logger . debug ( "Failed to remove worker from hashrate tracker: %s" , e )
399399
400400 self ._state .new_sessions .discard (self )
401401 self ._state .all_sessions .discard (self )
@@ -405,8 +405,8 @@ async def connection_lost(self):
405405 except TypeError :
406406 try :
407407 super ().connection_lost ()
408- except Exception :
409- pass
408+ except Exception as e :
409+ self . logger . debug ( "Error calling connection_lost: %s" , e )
410410
411411 async def handle_subscribe (self , * args ):
412412 if self not in self ._state .all_sessions :
@@ -570,8 +570,8 @@ async def _keepalive_loop(self):
570570 if abs (vd - difficulty ) / max (difficulty , 1e-9 ) >= 0.05 :
571571 difficulty = vd
572572 self ._share_difficulty = vd
573- except Exception :
574- pass
573+ except Exception as e :
574+ self . logger . debug ( "Vardiff adjustment failed: %s" , e )
575575 await self .send_notification ("mining.set_difficulty" , (difficulty ,))
576576 self ._last_activity = loop .time ()
577577 self .logger .debug (
@@ -719,8 +719,8 @@ async def handle_submit(self, *args, **kwargs):
719719 # Record rejected share (confidence accounting) using assigned diff
720720 try :
721721 hashrate_tracker .add_share (worker , sent_diff , accepted = False )
722- except Exception :
723- pass
722+ except Exception as e :
723+ self . logger . debug ( "Failed to record rejected share: %s" , e )
724724 if self ._debug_shares :
725725 self .logger .error (
726726 "Low difficulty share: shareDiff=%.18f minerDiff=%.18f" ,
@@ -744,8 +744,8 @@ async def handle_submit(self, *args, **kwargs):
744744 await _vardiff_mod .vardiff_manager .record_share (
745745 worker , share_difficulty = sent_diff
746746 )
747- except Exception :
748- pass
747+ except Exception as e :
748+ self . logger . debug ( "Failed to record share for vardiff: %s" , e )
749749
750750 # Log share statistics asynchronously
751751 import time
0 commit comments