From 22b1f53e3e6a1c630e73a6a784f759250c2c5d3f Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 20 Nov 2024 15:02:45 +0100 Subject: [PATCH 1/2] daemon: add signet support --- loopd/config.go | 3 ++- loopd/daemon.go | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/loopd/config.go b/loopd/config.go index 586f9ffb4..3adc81d34 100644 --- a/loopd/config.go +++ b/loopd/config.go @@ -145,7 +145,7 @@ type viewParameters struct{} type Config struct { ShowVersion bool `long:"version" description:"Display version information and exit"` - Network string `long:"network" description:"network to run on" choice:"regtest" choice:"testnet" choice:"mainnet" choice:"simnet"` + Network string `long:"network" description:"network to run on" choice:"regtest" choice:"testnet" choice:"mainnet" choice:"simnet" choice:"signet"` RPCListen string `long:"rpclisten" description:"Address to listen on for gRPC clients"` RESTListen string `long:"restlisten" description:"Address to listen on for REST clients"` CORSOrigin string `long:"corsorigin" description:"The value to send in the Access-Control-Allow-Origin header. Header will be omitted if empty."` @@ -197,6 +197,7 @@ type Config struct { const ( mainnetServer = "swap.lightning.today:11010" testnetServer = "test.swap.lightning.today:11010" + signetServer = "signet.swap.lightning.today:11010" ) // DefaultConfig returns all default values for the Config struct. diff --git a/loopd/daemon.go b/loopd/daemon.go index 6c72440c2..e96e04286 100644 --- a/loopd/daemon.go +++ b/loopd/daemon.go @@ -373,8 +373,13 @@ func (d *Daemon) initialize(withMacaroonService bool) error { switch d.cfg.Network { case "mainnet": d.cfg.Server.Host = mainnetServer + case "testnet": d.cfg.Server.Host = testnetServer + + case "signet": + d.cfg.Server.Host = signetServer + default: return errors.New("no swap server address specified") } From 889a938a789e29a6470adb1d924f03295fd5c3a4 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 20 Nov 2024 15:03:12 +0100 Subject: [PATCH 2/2] conf: add signet in sample conf --- sample-loopd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample-loopd.conf b/sample-loopd.conf index a0ca7b97b..b031201c1 100644 --- a/sample-loopd.conf +++ b/sample-loopd.conf @@ -18,7 +18,7 @@ [Application Options] -; The network to run on which can be [regtest|testnet|mainnet|simnet]. +; The network to run on which can be [regtest|testnet|mainnet|simnet|signet]. ; network=mainnet ; Address to listen on for gRPC clients.