add pong handler to reduce verbosity

This commit is contained in:
ThomasV 2018-09-25 11:57:37 +02:00 committed by SomberNight
parent 75feba4b96
commit 1d9ea1935e
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9

View file

@ -396,7 +396,6 @@ class Peer(PrintError):
def process_message(self, message):
message_type, payload = decode_msg(message)
#self.print_error("Received '%s'" % message_type.upper())
try:
f = getattr(self, 'on_' + message_type)
except AttributeError:
@ -414,6 +413,9 @@ class Peer(PrintError):
l = int.from_bytes(payload['num_pong_bytes'], 'big')
self.send_message(gen_msg('pong', byteslen=l))
def on_pong(self, payload):
pass
def on_accept_channel(self, payload):
temp_chan_id = payload["temporary_channel_id"]
if temp_chan_id not in self.channel_accepted: raise Exception("Got unknown accept_channel")