htlcswitch+config: make circular forwarding defence configurable

Add a bool to the switch's config which can be used to disable same
channel circular route checks.
This commit is contained in:
carla committed 2020-01-30 10:13:47 +02:00
1 parent a3478f1d99
commit afc7cc7f84
2 files changed
+3

No files matched your search

+1
View File
@@ -470,6 +470,7 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB,
FwdEventTicker: ticker.New(htlcswitch.DefaultFwdEventInterval),
LogEventTicker: ticker.New(htlcswitch.DefaultLogInterval),
AckEventTicker: ticker.New(htlcswitch.DefaultAckInterval),
AllowCircularRoute: cfg.AllowCircularRoute,
RejectHTLC: cfg.RejectHTLC,
}, uint32(currentHeight))
if err != nil {