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:
1 parent
933b959aa8
commit
f4fe76aaf1
8 files changed
+189
-93
No files matched your search
@@ -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