|
15 | 15 | //! and payee using information provided by the payer and from the payee's [`Invoice`], when
|
16 | 16 | //! applicable.
|
17 | 17 | //!
|
18 |
| -//! [`InvoicePayer`] is parameterized by a [`LockableScore`], which it uses for scoring failed and |
19 |
| -//! successful payment paths upon receiving [`Event::PaymentPathFailed`] and |
20 |
| -//! [`Event::PaymentPathSuccessful`] events, respectively. |
| 18 | +//! [`InvoicePayer`] uses its [`Router`] parameterization for scoring failed and successful payment |
| 19 | +//! paths upon receiving [`Event::PaymentPathFailed`] and [`Event::PaymentPathSuccessful`] events, |
| 20 | +//! respectively. |
21 | 21 | //!
|
22 | 22 | //! [`InvoicePayer`] is capable of retrying failed payments. It accomplishes this by implementing
|
23 | 23 | //! [`EventHandler`] which decorates a user-provided handler. It will intercept any
|
|
78 | 78 | //! #
|
79 | 79 | //! # struct FakeRouter {}
|
80 | 80 | //! # impl Router for FakeRouter {
|
81 |
| -//! # fn find_route( |
82 |
| -//! # &self, payer: &PublicKey, params: &RouteParameters, payment_hash: &PaymentHash, |
83 |
| -//! # first_hops: Option<&[&ChannelDetails]>, inflight_htlc_map: std::collections::HashMap<(u64, bool), u64> |
84 |
| -//! # ) -> Result<Route, LightningError> { use std::collections::HashMap; |
85 |
| -//! unimplemented!() } |
86 |
| -//! |
87 |
| -//! fn payment_path_failed(&self, path: Vec<&RouteHop>, short_channel_id: u64) { |
88 |
| -//! unimplemented!() |
89 |
| -//! } |
90 |
| -//! |
91 |
| -//! fn payment_path_successful(&self, path: Vec<&RouteHop>) { |
92 |
| -//! unimplemented!() |
93 |
| -//! } |
94 |
| -//! |
95 |
| -//! fn payment_probe_successful(&self, path: Vec<&RouteHop>) { |
96 |
| -//! unimplemented!() |
97 |
| -//! } |
98 |
| -//! |
99 |
| -//! fn payment_probe_failed(&self, path: Vec<&RouteHop>, short_channel_id: u64) { |
100 |
| -//! unimplemented!() |
101 |
| -//! } |
| 81 | +//! # fn find_route( |
| 82 | +//! # &self, payer: &PublicKey, params: &RouteParameters, payment_hash: &PaymentHash, |
| 83 | +//! # first_hops: Option<&[&ChannelDetails]>, inflight_htlc_map: std::collections::HashMap<(u64, bool), u64> |
| 84 | +//! # ) -> Result<Route, LightningError> { unimplemented!() } |
| 85 | +//! # |
| 86 | +//! # fn payment_path_failed(&self, path: Vec<&RouteHop>, short_channel_id: u64) { unimplemented!() } |
| 87 | +//! # fn payment_path_successful(&self, path: Vec<&RouteHop>) { unimplemented!() } |
| 88 | +//! # fn payment_probe_successful(&self, path: Vec<&RouteHop>) { unimplemented!() } |
| 89 | +//! # fn payment_probe_failed(&self, path: Vec<&RouteHop>, short_channel_id: u64) { unimplemented!() } |
102 | 90 | //! # }
|
103 | 91 | //! #
|
104 | 92 | //! # struct FakeScorer {}
|
|
0 commit comments