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:
Olaoluwa Osuntokun committed 2017-06-05 19:14:41 -07:00
1 parent 33decbe6ab
commit 593ba7c8f0
2 files changed
+58 -38

No files matched your search

+4 -1
View File
@@ -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