You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously we always required providing the node's address when opening
a channel. This was annoying because we may not even need it because
we're already connected to the peer. Now we look up the node's address
from our peers list if the address is not provided.
Also did the same handling as connect peer where you can provide the
node and address as pk@addr instead of 2 separate args for easier use in
the cli.
Copy file name to clipboardExpand all lines: ldk-server-cli/src/main.rs
+29-11Lines changed: 29 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -249,16 +249,18 @@ enum Commands {
249
249
},
250
250
#[command(about = "Create a new outbound channel to the given remote node")]
251
251
OpenChannel{
252
-
#[arg(help = "The hex-encoded public key of the node to open a channel with")]
252
+
#[arg(help = "The node to open a channel with, as hex pubkey or pubkey@address format")]
253
253
node_pubkey:String,
254
-
#[arg(
255
-
help = "Address to connect to remote peer (IPv4:port, IPv6:port, OnionV3:port, or hostname:port)"
256
-
)]
257
-
address:String,
258
254
#[arg(
259
255
help = "The amount to commit to the channel, e.g. 100sat or 100000msat, must be a whole sat amount, cannot send msats on-chain."
260
256
)]
261
257
channel_amount:Amount,
258
+
#[arg(
259
+
short,
260
+
long,
261
+
help = "Address to connect to remote peer (IPv4:port, IPv6:port, OnionV3:port, or hostname:port). Optional if included in pubkey via @ separator or if peer is already connected."
262
+
)]
263
+
address:Option<String>,
262
264
#[arg(long, help = "Amount to push to the remote side, e.g. 50sat or 50000msat")]
263
265
push_to_counterparty:Option<Amount>,
264
266
#[arg(long, help = "Whether the channel should be public")]
0 commit comments