Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lightning/src/routing/network_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ impl RouteFeePenalty for DefaultMetadata {
if self.failed_channels.get(&chan_id) == None {
return 0;
} else {
return u64::MAX;
return u64::max_value();
}
}

Expand Down
4 changes: 2 additions & 2 deletions lightning/src/routing/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use chain::chaininterface::ChainWatchInterface;
use ln::channelmanager;
use ln::features::{ChannelFeatures, NodeFeatures};
use ln::msgs::{DecodeError,ErrorAction,LightningError};
use routing::network_graph::{NetGraphMsgHandler, RoutingFees};
use routing::network_graph::{NetGraphMsgHandler, RoutingFees, RouteFeePenalty};
use util::ser::{Writeable, Readable};
use util::logger::Logger;

Expand Down Expand Up @@ -162,7 +162,7 @@ struct DummyDirectionalChannelInfo {
/// equal), however the enabled/disabled bit on such channels as well as the htlc_minimum_msat
/// *is* checked as they may change based on the receiving node.
pub fn get_route<C: Deref, L: Deref>(our_node_id: &PublicKey, net_graph_msg_handler: &NetGraphMsgHandler<C, L>, target: &PublicKey, first_hops: Option<&[channelmanager::ChannelDetails]>,
last_hops: &[RouteHint], final_value_msat: u64, final_cltv: u32, logger: L) -> Result<Route, LightningError> where C::Target: ChainWatchInterface, L::Target: Logger {
last_hops: &[RouteHint], final_value_msat: u64, final_cltv: u32, logger: L, net_metadata: impl RouteFeePenalty) -> Result<Route, LightningError> where C::Target: ChainWatchInterface, L::Target: Logger {
// TODO: Obviously *only* using total fee cost sucks. We should consider weighting by
// uptime/success in using a node in the past.
if *target == *our_node_id {
Expand Down