We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RouteParameters
1 parent 073f078 commit b3612b8Copy full SHA for b3612b8
lightning/src/routing/router.rs
@@ -435,6 +435,13 @@ pub struct RouteParameters {
435
pub final_value_msat: u64,
436
}
437
438
+impl RouteParameters {
439
+ /// Constructs [`RouteParameters`] from the given [`PaymentParameters`] and a payment amount.
440
+ pub fn from_payment_params_and_value(payment_params: PaymentParameters, final_value_msat: u64) -> Self {
441
+ Self { payment_params, final_value_msat }
442
+ }
443
+}
444
+
445
impl Writeable for RouteParameters {
446
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), io::Error> {
447
write_tlv_fields!(writer, {
0 commit comments