restore log lines for send_commitment, on_commitment_signed

This commit is contained in:
ThomasV 2020-02-26 19:14:49 +01:00
parent 87fe2c7d7a
commit 3d0c1dbd5c

View file

@ -1015,6 +1015,7 @@ class Peer(Logger):
# if there are no changes, we will not (and must not) send a new commitment # if there are no changes, we will not (and must not) send a new commitment
if not chan.has_pending_changes(REMOTE): if not chan.has_pending_changes(REMOTE):
return return
self.logger.info(f'send_commitment. chan {chan.short_channel_id}. ctn: {chan.get_next_ctn(REMOTE)}.')
sig_64, htlc_sigs = chan.sign_next_commitment() sig_64, htlc_sigs = chan.sign_next_commitment()
self.send_message("commitment_signed", channel_id=chan.channel_id, signature=sig_64, num_htlcs=len(htlc_sigs), htlc_signature=b"".join(htlc_sigs)) self.send_message("commitment_signed", channel_id=chan.channel_id, signature=sig_64, num_htlcs=len(htlc_sigs), htlc_signature=b"".join(htlc_sigs))
@ -1079,6 +1080,7 @@ class Peer(Logger):
chan = self.channels[channel_id] chan = self.channels[channel_id]
if chan.peer_state == peer_states.BAD: if chan.peer_state == peer_states.BAD:
return return
self.logger.info(f'on_commitment_signed. chan {chan.short_channel_id}. ctn: {chan.get_next_ctn(LOCAL)}.')
# make sure there were changes to the ctx, otherwise the remote peer is misbehaving # make sure there were changes to the ctx, otherwise the remote peer is misbehaving
if not chan.has_pending_changes(LOCAL): if not chan.has_pending_changes(LOCAL):
# TODO if feerate changed A->B->A; so there were updates but the value is identical, # TODO if feerate changed A->B->A; so there were updates but the value is identical,