mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
multi: make the next protocol version optional
This commit is contained in:
parent
9b37d744a0
commit
00cf4bf71c
7 changed files with 74 additions and 26 deletions
|
|
@ -149,6 +149,8 @@ type Config struct {
|
|||
TotalPaymentTimeout time.Duration `long:"totalpaymenttimeout" description:"The timeout to use for off-chain payments."`
|
||||
MaxPaymentRetries int `long:"maxpaymentretries" description:"The maximum number of times an off-chain payment may be retried."`
|
||||
|
||||
EnableExperimental bool `long:"experimental" description:"Enable experimental features: taproot HTLCs and MuSig2 loop out sweeps."`
|
||||
|
||||
Lnd *lndConfig `group:"lnd" namespace:"lnd"`
|
||||
|
||||
Server *loopServerConfig `group:"server" namespace:"server"`
|
||||
|
|
@ -185,6 +187,7 @@ func DefaultConfig() Config {
|
|||
LoopOutMaxParts: defaultLoopOutMaxParts,
|
||||
TotalPaymentTimeout: defaultTotalPaymentTimeout,
|
||||
MaxPaymentRetries: defaultMaxPaymentRetries,
|
||||
EnableExperimental: false,
|
||||
Lnd: &lndConfig{
|
||||
Host: "localhost:10009",
|
||||
MacaroonPath: DefaultLndMacaroonPath,
|
||||
|
|
|
|||
|
|
@ -348,6 +348,12 @@ func (d *Daemon) startWebServers() error {
|
|||
// this method fails with an error then no goroutine was started yet and no
|
||||
// cleanup is necessary. If it succeeds, then goroutines have been spawned.
|
||||
func (d *Daemon) initialize(withMacaroonService bool) error {
|
||||
if d.cfg.EnableExperimental {
|
||||
loopdb.EnableExperimentalProtocol()
|
||||
}
|
||||
|
||||
log.Infof("Protocol version: %v", loopdb.CurrentProtocolVersion())
|
||||
|
||||
// If no swap server is specified, use the default addresses for mainnet
|
||||
// and testnet.
|
||||
if d.cfg.Server.Host == "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue