lnd.xprv/htlcswitch
ccdle12 05d0d028bc
htlcswitch+config+server: Adds a rejecthtlc flag that disables forwarded
htlcs

config: Adding RejectHTLC field in config struct

This commit adds a RejectHTLC field in the config struct in config.go.
This allows the user to run lnd as a node that does not accept onward
HTLCs.

htlcswitch/switch: Adding a field RejectHTLC to the switch config

This commit adds a field RejectHTLC to the switch config. When the
switch receives an HTLC it will check this flag and if the HTLC is not
from the source hop, the HTLC will be rejected.

htlcswitch/switch: adding check for RejectHTLC flag and incomingChanID

This commit adds a check when receiving UpdateAddHTLC. The check looks
for the RejectHTLC flag set and whether the HTLC is from the sourceHop
(the local switch). If the HTLC is not from the sourceHop, then we
reject the HTLC and return a FailChannelDisabled error.

server: adding RejectHTLC field to initialization of switch

lnd_test: adding test for RejectHTLC

This commit adds a test which tests that a node with the --rejecthtlc
flag will reject any onward HTLCs but still can receive direct HTLCs and
can send HTLCs.
2019-08-20 11:01:44 +01:00
..
hodl htlcswitch/hodl: switch from debug tag to dev 2018-10-05 13:04:45 +09:00
circuit_map.go multi: switch from bolt packge to bbolt package for all imports 2018-11-29 20:33:49 -08:00
circuit_test.go multi: update to go 1.11 gofmt 2018-10-07 14:37:38 +09:00
circuit.go multi: fix various typos in comments 2018-09-07 06:51:49 +02:00
decayedlog_test.go htlcswitch/decayedlog_test: fix bug in gc unit test 2018-06-27 14:40:28 -07:00
decayedlog.go multi: switch from bolt packge to bbolt package for all imports 2018-11-29 20:33:49 -08:00
failure.go htlcswitch: do not consider unknown failures an error 2019-07-11 19:49:49 +02:00
interfaces.go htlcswitch/interface: add TowerClient iface 2019-06-13 19:54:17 -07:00
iterator.go multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
link_test.go multi: remove debug invoices 2019-08-14 21:33:03 +02:00
link.go multi: remove debug invoices 2019-08-14 21:33:03 +02:00
linkfailure.go htlcswitch/linkfailure: define LinkFailureError 2018-05-25 06:58:18 +02:00
log.go multi: init subsystem loggers via build pkg 2018-10-05 13:04:45 +09:00
mailbox_test.go htlcswitch/mailbox_test: add orchestrator pending/live test 2018-05-09 16:07:52 -07:00
mailbox.go multi: replace manual CAS with sync.Once in several more modules 2019-06-12 09:37:26 -03:00
mock.go htlcswitch: pipeline settles to switch 2019-07-18 17:20:40 -04:00
packet.go htlcswitch: for UpdateFailMalformedHTLC packets mark fail as needing conversion 2019-04-30 20:13:34 -07:00
payment_result_test.go htlcswitch/payment_result_test: add TestNetworkResultStore 2019-06-07 16:53:33 +02:00
payment_result.go htlcswitch/payment_result: add paymentResultStore 2019-06-07 16:53:32 +02:00
queue_test.go htlcswitch: Remove obsolete fields from htlcPacket. 2017-12-14 17:53:58 -08:00
queue.go htlcswitch: ensure the packet queue exits on stop 2018-06-08 13:51:37 -07:00
sequencer.go multi: switch from bolt packge to bbolt package for all imports 2018-11-29 20:33:49 -08:00
switch_test.go multi: rename FailUnknownPaymentHash to FailIncorrectDetails 2019-08-08 11:04:17 +02:00
switch.go htlcswitch+config+server: Adds a rejecthtlc flag that disables forwarded 2019-08-20 11:01:44 +01:00
test_utils.go htlcswitch+lnd: make max cltv expiry configurable 2019-07-26 18:05:58 -07:00