1
0

redeem htlcs:

- fix bug in lnsweep: lnwatcher transactions were indexed by prev_txid
 - add test for breach remedy with unsettled htlcs
 - add timeout option to lnpay, and replace DO_NOT_SETTLE with SETTLE_DELAY
   so that we can read intermediate commitment tx in regtest
This commit is contained in:
ThomasV
2019-05-29 17:34:12 +02:00
parent 7418bd4552
commit 7be4cdaf18
8 changed files with 73 additions and 32 deletions

View File

@@ -1237,8 +1237,7 @@ class Peer(Logger):
await self.fail_htlc(chan, htlc.htlc_id, onion_packet, reason)
return
self.network.trigger_callback('htlc_added', htlc, invoice, RECEIVED)
if self.network.config.debug_lightning_do_not_settle:
return
await asyncio.sleep(self.network.config.lightning_settle_delay)
await self._fulfill_htlc(chan, htlc.htlc_id, preimage)
async def _fulfill_htlc(self, chan: Channel, htlc_id: int, preimage: bytes):