@@ -1186,10 +1186,6 @@ impl Node {
1186
1186
Ok ( ( ) )
1187
1187
}
1188
1188
1189
- /// Connect to a node and open a new channel.
1190
- ///
1191
- /// See [`Node::open_channel`] or [`Node::open_announced_channel`] for more information about
1192
- /// parameters.
1193
1189
fn open_channel_inner (
1194
1190
& self , node_id : PublicKey , address : SocketAddress , channel_amount_sats : u64 ,
1195
1191
push_to_counterparty_msat : Option < u64 > , channel_config : Option < ChannelConfig > ,
@@ -1293,7 +1289,9 @@ impl Node {
1293
1289
}
1294
1290
}
1295
1291
1296
- /// Connect to a node and open a new channel.
1292
+ /// Connect to a node and open a new unannounced channel.
1293
+ ///
1294
+ /// To open an announced channel, see [`Node::open_announced_channel`].
1297
1295
///
1298
1296
/// Disconnects and reconnects are handled automatically.
1299
1297
///
@@ -1305,8 +1303,6 @@ impl Node {
1305
1303
/// [`AnchorChannelsConfig::per_channel_reserve_sats`] is available and will be retained before
1306
1304
/// opening the channel.
1307
1305
///
1308
- /// Calls `Node::open_channel_inner` with `announce_channel` set to `false`.
1309
- ///
1310
1306
/// Returns a [`UserChannelId`] allowing to locally keep track of the channel.
1311
1307
pub fn open_channel (
1312
1308
& self , node_id : PublicKey , address : SocketAddress , channel_amount_sats : u64 ,
@@ -1324,6 +1320,12 @@ impl Node {
1324
1320
1325
1321
/// Connect to a node and open a new announced channel.
1326
1322
///
1323
+ /// This will return an error if the node has not been sufficiently configured to operate as a
1324
+ /// forwarding node that can properly announce its existence to the publip network graph, i.e.,
1325
+ /// [`Config::listening_addresses`] and [`Config::node_alias`] are unset.
1326
+ ///
1327
+ /// To open an unannounced channel, see [`Node::open_channel`].
1328
+ ///
1327
1329
/// Disconnects and reconnects are handled automatically.
1328
1330
///
1329
1331
/// If `push_to_counterparty_msat` is set, the given value will be pushed (read: sent) to the
@@ -1334,12 +1336,6 @@ impl Node {
1334
1336
/// [`AnchorChannelsConfig::per_channel_reserve_sats`] is available and will be retained before
1335
1337
/// opening the channel.
1336
1338
///
1337
- /// Note that, regardless of the value of `announce_channel` passed, this function
1338
- /// checks that a node is configured to announce the channel to be openned and returns
1339
- /// an error if the configuration is wrong. Otherwise, calls `Node::open_channel_inner`
1340
- /// with `announced_channel` equals to `true`.
1341
- /// See `config::can_announce_channel` for more details.
1342
- ///
1343
1339
/// Returns a [`UserChannelId`] allowing to locally keep track of the channel.
1344
1340
pub fn open_announced_channel (
1345
1341
& self , node_id : PublicKey , address : SocketAddress , channel_amount_sats : u64 ,
0 commit comments