Skip to content

Commit 3df3052

Browse files
Remove minimum_fee_penalty
1 parent 0660024 commit 3df3052

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lightning/src/routing/network_graph.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,6 @@ pub struct ChannelInfo {
260260
/// Everything else is useful only for sending out for initial routing sync.
261261
/// Not stored if contains excess data to prevent DoS.
262262
pub announcement_message: Option<msgs::ChannelAnnouncement>,
263-
/// The minimum fee the user is willing to pay to avoid using a channel
264-
pub minimum_fee_penalty: Option<u64>,
265263
}
266264

267265
impl std::fmt::Display for ChannelInfo {
@@ -278,8 +276,7 @@ impl_writeable!(ChannelInfo, 0, {
278276
one_to_two,
279277
node_two,
280278
two_to_one,
281-
announcement_message,
282-
minimum_fee_penalty
279+
announcement_message
283280
});
284281

285282
/// Fees for routing via a given channel or a node
@@ -439,7 +436,7 @@ pub trait ChannelScorer {
439436
/// the metadata they are tracking (eg metrics for reliability, uptime, floppiness, etc.)
440437
type Metadata;
441438
/// Returns penalty fee for a given channel ID based on user's channel metadata
442-
fn calculate_minimum_fee_penalty(&self, _channel_id: u64) -> Option<u64> { None }
439+
fn calculate_minimum_fee_penalty(&self, _channel_id: u64) -> u64 { 0 }
443440
/// Optional: allows user to count PaymentSent events for channels
444441
fn score_payment_success(&self, _route: Vec<Vec<RouteHop>>, _metadata: Vec<Self::Metadata>) {}
445442
/// Optional: allows user to count PaymentFailed events for channels
@@ -587,7 +584,6 @@ impl NetworkGraph {
587584
node_two: msg.contents.node_id_2.clone(),
588585
two_to_one: None,
589586
announcement_message: if should_relay { Some(msg.clone()) } else { None },
590-
minimum_fee_penalty: None,
591587
};
592588

593589
match self.channels.entry(msg.contents.short_channel_id) {

0 commit comments

Comments
 (0)