lnd+server+keychain: remove unused code

This commit is contained in:
Oliver Gugger
2020-04-28 10:06:35 +02:00
parent 08d6a61e2a
commit 36b90382d3
5 changed files with 2 additions and 58 deletions

16
lnd.go
View File

@@ -27,7 +27,6 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcwallet/wallet"
proxy "github.com/grpc-ecosystem/grpc-gateway/runtime"
@@ -471,19 +470,6 @@ func Main(cfg *Config, lisCfg ListenerCfg, shutdownChan <-chan struct{}) error {
cfg.registeredChains.RegisterChain(primaryChain, activeChainControl)
// TODO(roasbeef): add rotation
idPrivKey, err := activeChainControl.wallet.DerivePrivKey(keychain.KeyDescriptor{
KeyLocator: keychain.KeyLocator{
Family: keychain.KeyFamilyNodeKey,
Index: 0,
},
})
if err != nil {
err := fmt.Errorf("unable to derive node private key: %v", err)
ltndLog.Error(err)
return err
}
idPrivKey.Curve = btcec.S256()
idKeyDesc, err := activeChainControl.keyRing.DeriveKey(
keychain.KeyLocator{
Family: keychain.KeyFamilyNodeKey,
@@ -623,7 +609,7 @@ func Main(cfg *Config, lisCfg ListenerCfg, shutdownChan <-chan struct{}) error {
// connections.
server, err := newServer(
cfg, cfg.Listeners, chanDB, towerClientDB, activeChainControl,
idPrivKey, &idKeyDesc, walletInitParams.ChansToRestore, chainedAcceptor,
&idKeyDesc, walletInitParams.ChansToRestore, chainedAcceptor,
torController,
)
if err != nil {