commit e9251c8e592a22fd11ef3cd1fdf7590515809925
parent 6937b87a7cb4686971d30595d6ef0929c9fa75c7
Author: SomberNight <somber.night@protonmail.com>
Date: Tue, 25 Feb 2020 20:09:33 +0100
lnpeer: add "DO NOT TRUST..." remark to errors sent by remote
potential phishing...
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/electrum/lnpeer.py b/electrum/lnpeer.py
@@ -162,7 +162,7 @@ class Peer(Logger):
asyncio.ensure_future(execution_result)
def on_error(self, payload):
- self.logger.info(f"on_error: {payload['data'].decode('ascii')}")
+ self.logger.info(f"remote peer sent error [DO NOT TRUST THIS MESSAGE]: {payload['data'].decode('ascii')}")
chan_id = payload.get("channel_id")
if chan_id in self.temp_id_to_id:
chan_id = self.temp_id_to_id[chan_id]
@@ -179,7 +179,7 @@ class Peer(Logger):
q = self.ordered_message_queues[channel_id]
name, payload = await asyncio.wait_for(q.get(), LN_P2P_NETWORK_TIMEOUT)
if payload.get('error'):
- raise Exception('Remote peer reported error: ' + repr(payload.get('error')))
+ raise Exception('Remote peer reported error [DO NOT TRUST THIS MESSAGE]: ' + repr(payload.get('error')))
if name != expected_name:
raise Exception(f"Received unexpected '{name}'")
return payload