Skip to content

Commit 7a8954e

Browse files
committed
Notify scorer of failing payment path and channel
Upon receiving a PaymentPathFailed event, the failing payment may be retried on a different path. To avoid using the channel responsible for the failure, a scorer should be notified of the failure before being used to find a new route. Add a payment_path_failed method to routing::Score and call it in InvoicePayer's event handler. Introduce a LockableScore parameterization to InvoicePayer so the scorer is locked only once before calling find_route.
1 parent 59659d3 commit 7a8954e

File tree

6 files changed

+216
-35
lines changed

6 files changed

+216
-35
lines changed

lightning-background-processor/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ mod tests {
311311
use lightning::ln::features::InitFeatures;
312312
use lightning::ln::msgs::{ChannelMessageHandler, Init};
313313
use lightning::ln::peer_handler::{PeerManager, MessageHandler, SocketDescriptor, IgnoringMessageHandler};
314+
use lightning::routing::scorer::Scorer;
314315
use lightning::routing::network_graph::{NetworkGraph, NetGraphMsgHandler};
315316
use lightning::util::config::UserConfig;
316317
use lightning::util::events::{Event, MessageSendEventsProvider, MessageSendEvent};

0 commit comments

Comments
 (0)