Skip to content

Commit fe966f8

Browse files
Remove default ChannelScorer impl on NetworkGraph
1 parent 6bc4c64 commit fe966f8

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lightning/src/routing/network_graph.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,6 @@ pub trait ChannelScorer {
437437
type Metadata;
438438
/// Returns penalty fee for a given channel ID based on user's channel metadata
439439
fn calculate_minimum_fee_penalty(&self, _channel_id: u64) -> u64 { 0 }
440-
/// Optional: allows user to count PaymentSent events for channels
441-
fn score_payment_success(&self, _route: Vec<Vec<RouteHop>>, _metadata: Vec<Self::Metadata>) {}
442-
/// Optional: allows user to count PaymentFailed events for channels
443-
fn score_payment_failure(&self, _route: Vec<Vec<RouteHop>>, _faulty_nodes: Vec<PublicKey>, _metadata: Vec<Self::Metadata>) {}
444440
}
445441

446442
/// Represents the network as nodes and channels between them
@@ -503,13 +499,6 @@ impl std::fmt::Display for NetworkGraph {
503499
}
504500
}
505501

506-
/// By default, just do nothing when scoring channels. A user is free to extend these
507-
/// definitions to meet their needs.
508-
impl ChannelScorer for NetworkGraph {
509-
/// The default type for Metadata is just a placeholder.
510-
type Metadata = Option<u8>;
511-
}
512-
513502
impl NetworkGraph {
514503
/// Returns all known valid channels' short ids along with announced channel info.
515504
pub fn get_channels<'a>(&'a self) -> &'a BTreeMap<u64, ChannelInfo> { &self.channels }

0 commit comments

Comments
 (0)