use crate::ln::features::{ChannelFeatures, InitFeatures, NodeFeatures};
use crate::ln::{msgs, wire};
use crate::ln::script::ShutdownScript;
+use crate::routing::router::{InFlightHtlcs, Route, RouteHop, RouteParameters, Router};
use crate::routing::scoring::FixedPenaltyScorer;
use crate::util::enforcing_trait_impls::{EnforcingSigner, EnforcementState};
use crate::util::events;
}
}
+pub struct TestRouter {}
+
+impl Router for TestRouter {
+ fn find_route(
+ &self, _payer: &PublicKey, _params: &RouteParameters, _first_hops: Option<&[&channelmanager::ChannelDetails]>,
+ _inflight_htlcs: InFlightHtlcs
+ ) -> Result<Route, msgs::LightningError> {
+ Err(msgs::LightningError {
+ err: String::from("Not implemented"),
+ action: msgs::ErrorAction::IgnoreError
+ })
+ }
+ fn notify_payment_path_failed(&self, _path: &[&RouteHop], _short_channel_id: u64) {}
+ fn notify_payment_path_successful(&self, _path: &[&RouteHop]) {}
+ fn notify_payment_probe_successful(&self, _path: &[&RouteHop]) {}
+ fn notify_payment_probe_failed(&self, _path: &[&RouteHop], _short_channel_id: u64) {}
+}
+
pub struct OnlyReadsKeysInterface {}
impl EntropySource for OnlyReadsKeysInterface {