lnd.xprv/htlcswitch
Olaoluwa Osuntokun 97e730cf51
htlcswitch: fix possible deadlock bug in packetQueue
This commit fixes a possible deadlock within the packetQueue that could
be caused by the following circular waiting dependency:
packetCoordinator woken up, grabs lock, queue isn’t empty, attempts to
send packet to link (lock still held) -> channelLink has commitment
overflow, attempts to add new item to packet queue, in AddPkt grabs
Lock -> circular wait.

We avoid this scenario by *not* holding the lock within the
packetCoordinator when we attempt to send a new packet to the switch.
Instead, we release the lock before the second select statement in the
main processing loop.
2017-09-25 15:59:31 -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: add new TestChannelLinkBandwidthConsistencyOverflow test 2017-09-25 13:01:34 -07:00
link.go htlcswitch: ensure the packetQueue can handle total+partial commitment overflows 2017-09-25 12:47:34 -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: ensure the packetQueue can handle total+partial commitment overflows 2017-09-25 12:47:34 -07:00
queue.go htlcswitch: fix possible deadlock bug in packetQueue 2017-09-25 15:59:31 -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