use lightning::chain::chaininterface::{BroadcasterInterface, FeeEstimator};
use lightning::chain::keysinterface::{Recipient, KeysInterface, Sign};
use lightning::ln::{PaymentHash, PaymentPreimage, PaymentSecret};
-use lightning::ln::channelmanager::{ChannelDetails, ChannelManager, PaymentId, PaymentSendFailure, PhantomRouteHints, MIN_FINAL_CLTV_EXPIRY, MIN_CLTV_EXPIRY_DELTA};
+use lightning::ln::channelmanager::{ChannelDetails, ChannelManager, PaymentId, PaymentSendFailure, MIN_FINAL_CLTV_EXPIRY};
+#[cfg(feature = "std")]
+use lightning::ln::channelmanager::{PhantomRouteHints, MIN_CLTV_EXPIRY_DELTA};
use lightning::ln::msgs::LightningError;
use lightning::routing::scoring::Score;
use lightning::routing::network_graph::{NetworkGraph, RoutingFees};
#[cfg(test)]
mod tests {
- use routing::scoring::{ProbabilisticScorer, ProbabilisticScoringParameters, Score};
use routing::network_graph::{NetworkGraph, NetGraphMsgHandler, NodeId};
use routing::router::{get_route, PaymentParameters, Route, RouteHint, RouteHintHop, RouteHop, RoutingFees};
+ use routing::scoring::Score;
use chain::transaction::OutPoint;
use ln::features::{ChannelFeatures, InitFeatures, InvoiceFeatures, NodeFeatures};
use ln::msgs::{ErrorAction, LightningError, OptionalField, UnsignedChannelAnnouncement, ChannelAnnouncement, RoutingMessageHandler,
#[test]
#[cfg(not(feature = "no-std"))]
fn generate_routes() {
+ use routing::scoring::{ProbabilisticScorer, ProbabilisticScoringParameters};
+
let mut d = match super::test_utils::get_route_file() {
Ok(f) => f,
Err(e) => {
#[test]
#[cfg(not(feature = "no-std"))]
fn generate_routes_mpp() {
+ use routing::scoring::{ProbabilisticScorer, ProbabilisticScoringParameters};
+
let mut d = match super::test_utils::get_route_file() {
Ok(f) => f,
Err(e) => {
pub struct TestLogger {
level: Level,
+ #[cfg(feature = "std")]
id: String,
+ #[cfg(not(feature = "std"))]
+ _id: String,
pub lines: Mutex<HashMap<(String, String), usize>>,
}
pub fn with_id(id: String) -> TestLogger {
TestLogger {
level: Level::Trace,
+ #[cfg(feature = "std")]
id,
+ #[cfg(not(feature = "std"))]
+ _id: id,
lines: Mutex::new(HashMap::new())
}
}