Skip to content

Commit 8ee4115

Browse files
committed
f - Rename fail_channel to channel_failed
1 parent 7af701f commit 8ee4115

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

fuzz/src/router.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) {
195195
},
196196
4 => {
197197
let short_channel_id = slice_to_be64(get_slice!(8));
198-
net_graph.fail_channel(short_channel_id, false);
198+
net_graph.channel_failed(short_channel_id, false);
199199
},
200200
_ if node_pks.is_empty() => {},
201201
_ => {

lightning/src/routing/network_graph.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ pub enum NetworkUpdate {
153153
msg: ChannelUpdate,
154154
},
155155
/// An error indicating only that a channel has failed, which should be applied via
156-
/// [`NetworkGraph::fail_channel`].
156+
/// [`NetworkGraph::channel_failed`].
157157
ChannelFailure {
158158
/// The short channel id of the closed channel.
159159
short_channel_id: u64,
@@ -267,7 +267,7 @@ where C::Target: chain::Access, L::Target: Logger
267267
NetworkUpdate::ChannelFailure { short_channel_id, is_permanent } => {
268268
let action = if is_permanent { "Removing" } else { "Disabling" };
269269
log_debug!(self.logger, "{} channel graph entry for {} due to a payment failure.", action, short_channel_id);
270-
self.network_graph.fail_channel(short_channel_id, is_permanent);
270+
self.network_graph.channel_failed(short_channel_id, is_permanent);
271271
},
272272
NetworkUpdate::NodeFailure { ref node_id, is_permanent } => {
273273
let action = if is_permanent { "Removing" } else { "Disabling" };
@@ -1012,7 +1012,7 @@ impl NetworkGraph {
10121012
/// If permanent, removes a channel from the local storage.
10131013
/// May cause the removal of nodes too, if this was their last channel.
10141014
/// If not permanent, makes channels unavailable for routing.
1015-
pub fn fail_channel(&self, short_channel_id: u64, is_permanent: bool) {
1015+
pub fn channel_failed(&self, short_channel_id: u64, is_permanent: bool) {
10161016
let mut channels = self.channels.write().unwrap();
10171017
if is_permanent {
10181018
if let Some(chan) = channels.remove(&short_channel_id) {

0 commit comments

Comments
 (0)