lnpeer: log both sent and recv msgs; use pubkey for incoming transports
Previously for incoming transports, the diagnostic_name (for log messages)
was just "responder" -- not sufficient to distinguish peers.
We now use the pubkey instead.
For outgoing transports it is f"{host}:{port}" (unchanged).
We could just use the pubkey for both uniformly; but it is quite long, and
it is hard to distinguish them at a glance.
This commit is contained in:
@@ -169,7 +169,7 @@ class AbstractChannel(Logger, ABC):
|
||||
old_state = self._state
|
||||
if (old_state, state) not in state_transitions:
|
||||
raise Exception(f"Transition not allowed: {old_state.name} -> {state.name}")
|
||||
self.logger.debug(f'Setting channel state: {old_state.name} -> {state.name}')
|
||||
self.logger.debug(f'({self.get_id_for_log()}) Setting channel state: {old_state.name} -> {state.name}')
|
||||
self._state = state
|
||||
self.storage['state'] = self._state.name
|
||||
if self.lnworker:
|
||||
|
||||
Reference in New Issue
Block a user