mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
Rename OpenChannelRequest::is_public
to is_announced
Referring to announced/unannounced channels as 'public'/'private' regularly leads to confusion on what they are and when which should be used. To avoid perpetuating this confusion, we should avoid referring to announced channels as 'public' in our API. Here we rename the recently introduced field in `OpenChannelRequest` (which doesn't break released API), and will align the pre-existing instances of `is_public` in the following commit (which will break API).
This commit is contained in:
parent
bbfa15eb18
commit
b9c73b1767
2 changed files with 3 additions and 3 deletions
|
@ -1316,7 +1316,7 @@ pub enum Event {
|
|||
/// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
|
||||
channel_type: ChannelTypeFeatures,
|
||||
/// True if this channel is (or will be) publicly-announced.
|
||||
is_public: bool,
|
||||
is_announced: bool,
|
||||
/// Channel parameters given by the counterparty.
|
||||
params: msgs::ChannelParameters,
|
||||
},
|
||||
|
|
|
@ -7423,14 +7423,14 @@ where
|
|||
MsgHandleErrInternal::from_chan_no_close(e, msg.common_fields.temporary_channel_id)
|
||||
)?;
|
||||
let mut pending_events = self.pending_events.lock().unwrap();
|
||||
let is_public = (msg.common_fields.channel_flags & 1) == 1;
|
||||
let is_announced = (msg.common_fields.channel_flags & 1) == 1;
|
||||
pending_events.push_back((events::Event::OpenChannelRequest {
|
||||
temporary_channel_id: msg.common_fields.temporary_channel_id.clone(),
|
||||
counterparty_node_id: counterparty_node_id.clone(),
|
||||
funding_satoshis: msg.common_fields.funding_satoshis,
|
||||
push_msat: msg.push_msat,
|
||||
channel_type,
|
||||
is_public,
|
||||
is_announced,
|
||||
params: msg.common_fields.channel_parameters(),
|
||||
}, None));
|
||||
peer_state.inbound_channel_request_by_id.insert(channel_id, InboundChannelRequest {
|
||||
|
|
Loading…
Add table
Reference in a new issue