lnd: use first key in keychain.KeyFamilyNodeKey as our nodeID

In this commit, we update lnd to now access the deterministic
keychain.KeyRing struct in order to obtain our identity public key.
With this change, if the user recovers their wallet with the same seed,
then they’ll have access to the same prior node identity. This change
also makes it easy for us to support node key rotation in the future by
bumping up our requested index.
This commit is contained in:
Olaoluwa Osuntokun
2018-02-17 15:40:10 -08:00
parent b41222b316
commit 1669e3d5ec
3 changed files with 13 additions and 6 deletions

View File

@ -146,7 +146,7 @@ func initAutoPilot(svr *server, cfg *autoPilotConfig) (*autopilot.Agent, error)
Heuristic: prefAttachment,
ChanController: &chanController{svr},
WalletBalance: func() (btcutil.Amount, error) {
return svr.cc.wallet.ConfirmedBalance(1, true)
return svr.cc.wallet.ConfirmedBalance(1)
},
Graph: autopilot.ChannelGraphFromDatabase(svr.chanDB.ChannelGraph()),
}