loopd+lsat: add LSAT cost configuration parameters

This commit is contained in:
Oliver Gugger 2020-01-10 11:21:55 +01:00
parent d9597e8387
commit 8aeeaefbaf
No known key found for this signature in database
GPG key ID: 8E4256593F177720
2 changed files with 15 additions and 6 deletions

View file

@ -4,6 +4,7 @@ import (
"path/filepath"
"github.com/btcsuite/btcutil"
"github.com/lightninglabs/loop/lsat"
)
var (
@ -39,7 +40,9 @@ type config struct {
MaxLogFiles int `long:"maxlogfiles" description:"Maximum logfiles to keep (0 for no rotation)"`
MaxLogFileSize int `long:"maxlogfilesize" description:"Maximum logfile size in MB"`
DebugLevel string `short:"d" long:"debuglevel" description:"Logging level for all subsystems {trace, debug, info, warn, error, critical} -- You may also specify <subsystem>=<level>,<subsystem2>=<level>,... to set the log level for individual subsystems -- Use show to list available subsystems"`
DebugLevel string `short:"d" long:"debuglevel" description:"Logging level for all subsystems {trace, debug, info, warn, error, critical} -- You may also specify <subsystem>=<level>,<subsystem2>=<level>,... to set the log level for individual subsystems -- Use show to list available subsystems"`
MaxLSATCost uint32 `long:"maxlsatcost" description:"Maximum cost in satoshis that loopd is going to pay for an LSAT token automatically. Does not include routing fees."`
MaxLSATFee uint32 `long:"maxlsatfee" description:"Maximum routing fee in satoshis that we are willing to pay while paying for an LSAT token."`
Lnd *lndConfig `group:"lnd" namespace:"lnd"`
@ -60,6 +63,8 @@ var defaultConfig = config{
MaxLogFiles: defaultMaxLogFiles,
MaxLogFileSize: defaultMaxLogFileSize,
DebugLevel: defaultLogLevel,
MaxLSATCost: lsat.DefaultMaxCostSats,
MaxLSATFee: lsat.DefaultMaxRoutingFeeSats,
Lnd: &lndConfig{
Host: "localhost:10009",
},