multi: ensure NodeKey is set in rpc/cli

This commit is contained in:
MeshCollider authored and Olaoluwa Osuntokun committed 2018-02-19 17:48:39 -08:00
1 parent 915c4201b9
commit 4c42079436
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -720,6 +720,11 @@ func (r *rpcServer) OpenChannel(in *lnrpc.OpenChannelRequest,
// TODO(roasbeef): also return channel ID?
// Ensure that the NodePubKey is set before attempting to use it
if len(in.NodePubkey) == 0 {
return fmt.Errorf("NodePubKey is not set")
}
// Parse the raw bytes of the node key into a pubkey object so we
// can easily manipulate it.
nodePubKey, err = btcec.ParsePubKey(in.NodePubkey, btcec.S256())
+1 -1
View File
@@ -1773,7 +1773,7 @@ func (s *server) DisconnectPeer(pubKey *btcec.PublicKey) error {
}
// OpenChannel sends a request to the server to open a channel to the specified
// peer identified by Public Key with the passed channel funding parameters.
// peer identified by nodeKey with the passed channel funding parameters.
//
// NOTE: This function is safe for concurrent access.
func (s *server) OpenChannel(nodeKey *btcec.PublicKey,