05d0d028bc
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. |
||
---|---|---|
.. | ||
hodl | ||
circuit_map.go | ||
circuit_test.go | ||
circuit.go | ||
decayedlog_test.go | ||
decayedlog.go | ||
failure.go | ||
interfaces.go | ||
iterator.go | ||
link_test.go | ||
link.go | ||
linkfailure.go | ||
log.go | ||
mailbox_test.go | ||
mailbox.go | ||
mock.go | ||
packet.go | ||
payment_result_test.go | ||
payment_result.go | ||
queue_test.go | ||
queue.go | ||
sequencer.go | ||
switch_test.go | ||
switch.go | ||
test_utils.go |