lnd.xprv/htlcswitch
Olaoluwa Osuntokun 64317c04f1
htlcswitch: use atomic integer to track link bandwidth internally
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.
2017-09-25 12:31:59 -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_test.go htlcswitch: fix linter errors 2017-08-22 01:05:32 -07:00
link.go htlcswitch: use atomic integer to track link bandwidth internally 2017-09-25 12:31:59 -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_test.go htlcswitch: re-write link's packet overflow queue for readability+extensibility 2017-09-22 15:54:16 -07:00
queue.go htlcswitch: re-write link's packet overflow queue for readability+extensibility 2017-09-22 15:54:16 -07:00
switch_test.go htlcswitch: fix minor typos in switch test file 2017-09-22 15:54:43 -07:00
switch.go htlcswitch: use %x when printing the payment hash of an HTLC 2017-09-12 18:08:50 +02:00
test_utils.go htlcswitch: properly populate CommitFee for channels created in tests 2017-09-25 11:07:33 -07:00