server: remove unused lightningID field

This commit is contained in:
Conner Fromknecht 2018-09-03 17:46:24 -07:00
parent 9c35528fce
commit 09992f3fb0
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -4,7 +4,6 @@ import (
"bytes" "bytes"
"context" "context"
"crypto/rand" "crypto/rand"
"crypto/sha256"
"encoding/hex" "encoding/hex"
"fmt" "fmt"
"image/color" "image/color"
@ -81,10 +80,6 @@ type server struct {
// that's backed by the identity private key of the running lnd node. // that's backed by the identity private key of the running lnd node.
nodeSigner *nodeSigner nodeSigner *nodeSigner
// lightningID is the sha256 of the public key corresponding to our
// long-term identity private key.
lightningID [32]byte
// listenAddrs is the list of addresses the server is currently // listenAddrs is the list of addresses the server is currently
// listening on. // listening on.
listenAddrs []net.Addr listenAddrs []net.Addr
@ -266,8 +261,7 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB, cc *chainControl,
// TODO(roasbeef): derive proper onion key based on rotation // TODO(roasbeef): derive proper onion key based on rotation
// schedule // schedule
sphinx: htlcswitch.NewOnionProcessor(sphinxRouter), sphinx: htlcswitch.NewOnionProcessor(sphinxRouter),
lightningID: sha256.Sum256(serializedPubKey[:]),
persistentPeers: make(map[string]struct{}), persistentPeers: make(map[string]struct{}),
persistentPeersBackoff: make(map[string]time.Duration), persistentPeersBackoff: make(map[string]time.Duration),