server: properly set node pubkey within initTorController

This commit is contained in:
Olaoluwa Osuntokun 2018-10-28 16:53:42 -07:00
parent eaba39d20e
commit 68d96488cc
No known key found for this signature in database
GPG Key ID: CE58F7F8E20FD9A2
2 changed files with 2 additions and 1 deletions

@ -29,7 +29,7 @@ through the network.
## Lightning Network Specification Compliance
`lnd` _fully_ conforms to the [Lightning Network specification
(BOLTs)](https://github.com/lightningnetwork/lightning-rfc). BOLT stands for:
Basic of Lightning Technologies. The specifications are currently being drafted
Basis of Lightning Technology. The specifications are currently being drafted
by several groups of implementers based around the world including the
developers of `lnd`. The set of specification documents as well as our
implementation of the specification are still a work-in-progress. With that

@ -1540,6 +1540,7 @@ func (s *server) initTorController() error {
Color: newNodeAnn.RGBColor,
AuthSigBytes: newNodeAnn.Signature.ToSignatureBytes(),
}
copy(selfNode.PubKeyBytes[:], s.identityPriv.PubKey().SerializeCompressed())
if err := s.chanDB.ChannelGraph().SetSourceNode(selfNode); err != nil {
return fmt.Errorf("can't set self node: %v", err)
}