de3af9b0c0
In this commit, we modify the existing implementation of the Bandwidth() method on the default ChannelLink implementation to use much tighter accounting. Before this commit, there was a bug wherein if the link restarted with pending un-settled HTLC’s, and one of them was settled, then the bandwidth wouldn’t properly be updated to reflect this fact. To fix this, we’ve done away with the manual accounting and instead grab the current balances from two sources: the set of active HTLC’s within the overflow queue, and the report from the link itself which includes the pending HTLC’s and factors in the amount we’d need to (or not need to) pay in fees for each HTLC. |
||
---|---|---|
.. | ||
circuit.go | ||
failure.go | ||
interfaces.go | ||
iterator.go | ||
link_test.go | ||
link.go | ||
log.go | ||
mailbox_test.go | ||
mailbox.go | ||
mock.go | ||
packet.go | ||
queue_test.go | ||
queue.go | ||
switch_test.go | ||
switch.go | ||
test_utils.go |