mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 14:12:27 +02:00
chainreg: add Config, move chainparams.go
Creates a Config that initializes the chainregistry struct in the lnd package. Also moves all of chainparams.go to the chainreg package.
This commit is contained in:
7
pilot.go
7
pilot.go
@ -9,6 +9,7 @@ import (
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/lightningnetwork/lnd/autopilot"
|
||||
"github.com/lightningnetwork/lnd/chainreg"
|
||||
"github.com/lightningnetwork/lnd/lncfg"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/tor"
|
||||
@ -76,7 +77,7 @@ type chanController struct {
|
||||
minConfs int32
|
||||
confTarget uint32
|
||||
chanMinHtlcIn lnwire.MilliSatoshi
|
||||
netParams bitcoinNetParams
|
||||
netParams chainreg.BitcoinNetParams
|
||||
}
|
||||
|
||||
// OpenChannel opens a channel to a target peer, with a capacity of the
|
||||
@ -134,8 +135,8 @@ var _ autopilot.ChannelController = (*chanController)(nil)
|
||||
// interfaces needed to drive it won't be launched before the Manager's
|
||||
// StartAgent method is called.
|
||||
func initAutoPilot(svr *server, cfg *lncfg.AutoPilot,
|
||||
chainCfg *lncfg.Chain, netParams bitcoinNetParams) (*autopilot.ManagerCfg,
|
||||
error) {
|
||||
chainCfg *lncfg.Chain, netParams chainreg.BitcoinNetParams) (
|
||||
*autopilot.ManagerCfg, error) {
|
||||
|
||||
atplLog.Infof("Instantiating autopilot with active=%v, "+
|
||||
"max_channels=%d, allocation=%f, min_chan_size=%d, "+
|
||||
|
Reference in New Issue
Block a user