X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain.rs;h=343c2d5356f3457c8f9372b1f54718a5ae8ea38e;hb=6957dac4dee55a0252df837e5ac3b1db87a9a556;hp=39237d844d6969ddc341d8b5c2f802b423f4ba51;hpb=f21537916008cc7c1030466363cd19dc82b8623f;p=ldk-sample diff --git a/src/main.rs b/src/main.rs index 39237d8..343c2d5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,7 +25,7 @@ use lightning::ln::channelmanager::{ use lightning::ln::peer_handler::{IgnoringMessageHandler, MessageHandler, SimpleArcPeerManager}; use lightning::ln::{PaymentHash, PaymentPreimage, PaymentSecret}; use lightning::routing::network_graph::{NetGraphMsgHandler, NetworkGraph}; -use lightning::routing::scorer::Scorer; +use lightning::routing::scoring::Scorer; use lightning::util::config::UserConfig; use lightning::util::events::{Event, PaymentPurpose}; use lightning::util::ser::ReadableArgs; @@ -213,26 +213,13 @@ async fn handle_ldk_events( } } } - Event::PaymentPathFailed { - payment_hash, - rejected_by_dest, - all_paths_failed, - short_channel_id, - .. - } => { + Event::PaymentPathSuccessful { .. } => {} + Event::PaymentPathFailed { .. } => {} + Event::PaymentFailed { payment_hash, .. } => { print!( - "\nEVENT: Failed to send payment{} to payment hash {:?}", - if *all_paths_failed { "" } else { " along MPP path" }, + "\nEVENT: Failed to send payment to payment hash {:?}: exhausted payment retry attempts", hex_utils::hex_str(&payment_hash.0) ); - if let Some(scid) = short_channel_id { - print!(" because of failure at channel {}", scid); - } - if *rejected_by_dest { - println!(": re-attempting the payment will not succeed"); - } else { - println!(": exhausted payment retry attempts"); - } print!("> "); io::stdout().flush().unwrap();