multi: remove Litecoin config options

This commit removes the `Litecoin`, `LtcMode` and `LitecoindMode`
members from the main LND `Config` struct. Since only the bitcoin
blockchain is now supported, this commit also deprecates the
`cfg.Bitcoin.Active` config option.
This commit is contained in:
Elle Mouton
2023-08-03 17:25:13 +02:00
committed by Olaoluwa Osuntokun
parent ba93cde07a
commit 3912d5a0c6
12 changed files with 156 additions and 454 deletions

View File

@@ -130,12 +130,7 @@ const (
// delta.
DefaultBitcoinTimeLockDelta = 80
DefaultLitecoinMinHTLCInMSat = lnwire.MilliSatoshi(1)
DefaultLitecoinMinHTLCOutMSat = lnwire.MilliSatoshi(1000)
DefaultLitecoinBaseFeeMSat = lnwire.MilliSatoshi(1000)
DefaultLitecoinFeeRate = lnwire.MilliSatoshi(1)
DefaultLitecoinTimeLockDelta = 576
DefaultLitecoinDustLimit = btcutil.Amount(54600)
DefaultLitecoinDustLimit = btcutil.Amount(54600)
// DefaultBitcoinStaticFeePerKW is the fee rate of 50 sat/vbyte
// expressed in sat/kw.
@@ -148,10 +143,6 @@ const (
// DefaultLitecoinStaticFeePerKW is the fee rate of 200 sat/vbyte
// expressed in sat/kw.
DefaultLitecoinStaticFeePerKW = chainfee.SatPerKWeight(50000)
// BtcToLtcConversionRate is a fixed ratio used in order to scale up
// payments when running on the Litecoin chain.
BtcToLtcConversionRate = 60
)
// DefaultLtcChannelConstraints is the default set of channel constraints that
@@ -355,13 +346,8 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) {
}
case "bitcoind", "litecoind":
var bitcoindMode *lncfg.Bitcoind
switch {
case cfg.Bitcoin.Active:
bitcoindMode = cfg.BitcoindMode
case cfg.Litecoin.Active:
bitcoindMode = cfg.LitecoindMode
}
bitcoindMode := cfg.BitcoindMode
// Otherwise, we'll be speaking directly via RPC and ZMQ to a
// bitcoind node. If the specified host for the btcd/ltcd RPC
// server already has a port specified, then we use that
@@ -617,14 +603,10 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) {
// connection. If a raw cert was specified in the config, then
// we'll set that directly. Otherwise, we attempt to read the
// cert from the path specified in the config.
var btcdMode *lncfg.Btcd
switch {
case cfg.Bitcoin.Active:
var (
rpcCert []byte
btcdMode = cfg.BtcdMode
case cfg.Litecoin.Active:
btcdMode = cfg.LtcdMode
}
var rpcCert []byte
)
if btcdMode.RawRPCCert != "" {
rpcCert, err = hex.DecodeString(btcdMode.RawRPCCert)
if err != nil {