Skip to content

Commit 700d8c8

Browse files
Merge branch 'score-channels-on-payment' of github.com:sourabhmarathe/rust-lightning into score-channels-on-payment
2 parents 20e3d70 + 44fd147 commit 700d8c8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lightning/src/routing/network_graph.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use chain::chaininterface::{ChainError, ChainWatchInterface};
1313
use ln::features::{ChannelFeatures, NodeFeatures};
1414
use ln::msgs::{DecodeError,ErrorAction,LightningError,RoutingMessageHandler,NetAddress};
1515
use ln::msgs;
16+
use routing::router::{Route, RouteHop};
1617
use util::ser::{Writeable, Readable, Writer};
1718
use util::logger::Logger;
1819

@@ -540,6 +541,13 @@ impl NetworkGraph {
540541
None
541542
}
542543

544+
/// Updates directional channels within the network graph based on route and
545+
/// whether or not the payment succeeded.
546+
pub fn score_channels_on_route(&mut self, route: Route, payment_succeeded: bool) -> Result<bool, LightningError> {
547+
548+
Ok(true)
549+
}
550+
543551
/// For an already known node (from channel announcements), update its stored properties from a given node announcement
544552
/// Announcement signatures are checked here only if Secp256k1 object is provided.
545553
fn update_node_from_announcement(&mut self, msg: &msgs::NodeAnnouncement, secp_ctx: Option<&Secp256k1<secp256k1::VerifyOnly>>) -> Result<bool, LightningError> {

0 commit comments

Comments
 (0)