lnd/htlcswitch
Olaoluwa Osuntokun be5b2d46a5
htlcswitch: ensure the packetQueue can handle total+partial commitment overflows
In this commit, we’ve moved away from the internal queryHandler within
the packetQueue entirely. We now use an internal queueLen variable
internally to allow callers to sample the queue’s size, and also for
synchronization purposes internally.

This commit also introduces a chan struct{} (freeSlots) that is used
internally as a semaphore. The current value of freeSlots reflects the
number of available slots within the commitment transaction. Within the
link, after an HTLC has been removed/modified, then a “slot” is freed
up. The main packetConsumer then interprets these messages as a signal
to attempt to free up a new slot within the queue itself by dumping off
to the commitment transaction.
2017-09-25 12:47:34 -07:00
..
circuit.go lnwire+htlcswitch: minor grammatical, formatting fixes after error PR 2017-07-14 20:08:37 -07:00
failure.go lnwire+htlcswitch: minor grammatical, formatting fixes after error PR 2017-07-14 20:08:37 -07:00
interfaces.go Htlcswitch: switch all accounting and forwarding decisions to use mSAT's 2017-08-22 00:53:04 -07:00
iterator.go htlcswitch: if we fail to parse and onion error, return the proper lnwire.FailCode 2017-09-12 18:10:40 +02:00
link.go htlcswitch: ensure the packetQueue can handle total+partial commitment overflows 2017-09-25 12:47:34 -07:00
link_test.go htlcswitch: fix linter errors 2017-08-22 01:05:32 -07:00
log.go lnd: remove seelog logger 2017-06-25 14:19:56 +01:00
mock.go multi: txscript.WitnessScript -> txscript.WitnessSignature 2017-08-24 18:55:32 -07:00
packet.go Htlcswitch: switch all accounting and forwarding decisions to use mSAT's 2017-08-22 00:53:04 -07:00
queue.go htlcswitch: ensure the packetQueue can handle total+partial commitment overflows 2017-09-25 12:47:34 -07:00
queue_test.go htlcswitch: ensure the packetQueue can handle total+partial commitment overflows 2017-09-25 12:47:34 -07:00
switch.go htlcswitch: use %x when printing the payment hash of an HTLC 2017-09-12 18:08:50 +02:00
switch_test.go htlcswitch: fix minor typos in switch test file 2017-09-22 15:54:43 -07:00
test_utils.go htlcswitch: properly populate CommitFee for channels created in tests 2017-09-25 11:07:33 -07:00