htlcswitch: add usage of queue in channel link

In this commit usage of the pending packet queue have been added.
This queue will consume the downstream packets if state machine return
the error that we do not have enough capacity for htlc in commitment
transaction. Upon receiving settle/fail payment descriptors - add htlc
have been removed, we release the slot, and process pending add htlc
requests.
This commit is contained in:
Andrey Samokhvalov authored and Olaoluwa Osuntokun committed 2017-05-31 11:06:08 -07:00
1 parent 22d90d6b35
commit 7595bee27c
3 files changed
+126 -2

No files matched your search

+1 -1
View File
@@ -359,7 +359,7 @@ func (n *threeHopNetwork) makePayment(peers []Peer,
select {
case err := <-errChan:
return invoice, err
case <-time.After(6 * time.Second):
case <-time.After(12 * time.Second):
return invoice, errors.New("htlc was no settled in time")
}
}