lnd.xprv/lntest
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
..
itest htlcswitch+config+server: Adds a rejecthtlc flag that disables forwarded 2019-08-20 11:01:44 +01:00
btcd.go lntest: add Name() to BackendCfg 2019-05-27 09:29:03 +02:00
doc.go lntest: Add doc.go with package documentation. 2017-12-14 20:06:23 -08:00
harness.go lntest: add flag -goroutinedump 2019-07-11 14:44:44 +02:00
neutrino.go lntest: add Name() to BackendCfg 2019-05-27 09:29:03 +02:00
node.go multi: add watchtower client RPC subserver 2019-07-30 15:18:15 -07:00
timeouts_darwin.go lntest/timeouts: split into darwin and non-darwin timeouts 2019-03-27 19:00:39 -07:00
timeouts.go lntest/timeouts: split into darwin and non-darwin timeouts 2019-03-27 19:00:39 -07:00