64317c04f1
This commit modifies the way the bandwidth of a given channel link is tracked, and reported externally. The prior approach pushed most of the logic for tracking channel bandwidth into the link itself, and relied on a report from the queue in order to determine the total available bandwidth. This approach at times could inadvertently introduce deadlocks when working on new features as since the query was handled internally, it required the link to be _active_ and non-blocked in order to respond to. We’ve now abandoned this approach in favor of lifting the bandwidth accounting to the highest possible abstraction layer within the link itself. We now maintain a availableBandwidth integer that’s used atomically within the link in response to: us adding+settling an HTLC, and the remote party failing one of our HTLC’s. |
||
---|---|---|
.. | ||
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 |