|
@ -1442,6 +1442,8 @@ class Peer(Logger): |
|
|
async def _fulfill_htlc(self, chan: Channel, htlc_id: int, preimage: bytes): |
|
|
async def _fulfill_htlc(self, chan: Channel, htlc_id: int, preimage: bytes): |
|
|
self.logger.info(f"_fulfill_htlc. chan {chan.short_channel_id}. htlc_id {htlc_id}") |
|
|
self.logger.info(f"_fulfill_htlc. chan {chan.short_channel_id}. htlc_id {htlc_id}") |
|
|
chan.settle_htlc(preimage, htlc_id) |
|
|
chan.settle_htlc(preimage, htlc_id) |
|
|
|
|
|
payment_hash = sha256(preimage) |
|
|
|
|
|
self.lnworker.set_invoice_status(payment_hash, PR_PAID) |
|
|
remote_ctn = chan.get_latest_ctn(REMOTE) |
|
|
remote_ctn = chan.get_latest_ctn(REMOTE) |
|
|
self.send_message("update_fulfill_htlc", |
|
|
self.send_message("update_fulfill_htlc", |
|
|
channel_id=chan.channel_id, |
|
|
channel_id=chan.channel_id, |
|
|