be5b2d46a5
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. |
||
---|---|---|
.. | ||
circuit.go | ||
failure.go | ||
interfaces.go | ||
iterator.go | ||
link_test.go | ||
link.go | ||
log.go | ||
mock.go | ||
packet.go | ||
queue_test.go | ||
queue.go | ||
switch_test.go | ||
switch.go | ||
test_utils.go |