mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 14:12:27 +02:00
lnd: newChainControlFromConfig can now create light client backed chainControl
This commit finishes up the implementation of newChainControlFromConfig in order to properly initiate the members of the chainControl struct when the new light client mode (neutrino). With this lnd is now able to switch over to either mode with a simple configuration change.
This commit is contained in:
5
lnd.go
5
lnd.go
@ -64,11 +64,14 @@ func lndMain() error {
|
||||
// With the information parsed from the configuration, create valid
|
||||
// instances of the paertinent interfaces required to operate the
|
||||
// Lightning Network Daemon.
|
||||
activeChainControl, err := newChainControlFromConfig(cfg, chanDB)
|
||||
activeChainControl, chainCleanUp, err := newChainControlFromConfig(cfg, chanDB)
|
||||
if err != nil {
|
||||
fmt.Printf("unable to create chain control: %v\n", err)
|
||||
return err
|
||||
}
|
||||
if chainCleanUp != nil {
|
||||
defer chainCleanUp()
|
||||
}
|
||||
|
||||
// Finally before we start the server, we'll register the "holy
|
||||
// trinity" of interface for our current "home chain" with the active
|
||||
|
Reference in New Issue
Block a user