1
0

lnpeer.htlc_switch: (bugfix) don't fulfill htlc until add is irrevocable

This makes the test added in prev commit pass.
This commit is contained in:
SomberNight
2021-01-28 20:03:30 +01:00
parent e8a2fa5596
commit 2b0f156ce8
2 changed files with 2 additions and 4 deletions

View File

@@ -858,6 +858,7 @@ class Channel(AbstractChannel):
local_ctn = self.get_latest_ctn(LOCAL)
remote_ctn = self.get_latest_ctn(REMOTE)
if onion_packet:
# TODO neither local_ctn nor remote_ctn are used anymore... no point storing them.
self.hm.log['unfulfilled_htlcs'][htlc.htlc_id] = local_ctn, remote_ctn, onion_packet.hex(), False
self.logger.info("receive_htlc")