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:
Joost Jager committed 2019-12-19 12:44:00 +01:00
1 parent 8ce9e15f4a
commit 37d9ee302c
9 files changed
+39 -61

No files matched your search

+1 -5
View File
@@ -4231,11 +4231,7 @@ func (r *rpcServer) GetNodeInfo(ctx context.Context,
// First, parse the hex-encoded public key into a full in-memory public
// key object we can work with for querying.
pubKeyBytes, err := hex.DecodeString(in.PubKey)
if err != nil {
return nil, err
}
pubKey, err := btcec.ParsePubKey(pubKeyBytes, btcec.S256())
pubKey, err := route.NewVertexFromStr(in.PubKey)
if err != nil {
return nil, err
}