diff --git a/config.go b/config.go index 10f79ba54..89b934a8b 100644 --- a/config.go +++ b/config.go @@ -341,6 +341,8 @@ type config struct { Watchtower *lncfg.Watchtower `group:"watchtower" namespace:"watchtower"` LegacyProtocol *lncfg.LegacyProtocol `group:"legacyprotocol" namespace:"legacyprotocol"` + + AllowCircularRoute bool `long:"allow-circular-route" description:"If true, our node will allow htlc forwards that arrive and depart on the same channel."` } // loadConfig initializes and parses the config using a config file and command diff --git a/server.go b/server.go index 72c666147..09a4dbc04 100644 --- a/server.go +++ b/server.go @@ -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 {