mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-04 18:01:57 +01:00
channeldb: take serialized key to fetch lightning node
This prevents inefficient key conversions in a follow up commit that change the inner pathfinding loop.
This commit is contained in:
@@ -3369,7 +3369,12 @@ func computeNextBackoff(currBackoff time.Duration) time.Duration {
|
||||
|
||||
// fetchNodeAdvertisedAddr attempts to fetch an advertised address of a node.
|
||||
func (s *server) fetchNodeAdvertisedAddr(pub *btcec.PublicKey) (net.Addr, error) {
|
||||
node, err := s.chanDB.ChannelGraph().FetchLightningNode(pub)
|
||||
vertex, err := route.NewVertexFromBytes(pub.SerializeCompressed())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
node, err := s.chanDB.ChannelGraph().FetchLightningNode(vertex)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user