We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Writeable
TrampolineForwardTlvs
1 parent 09ffa57 commit 5074accCopy full SHA for 5074acc
lightning/src/blinded_path/payment.rs
@@ -514,6 +514,24 @@ impl Writeable for ForwardTlvs {
514
}
515
516
517
+#[cfg(trampoline)]
518
+impl Writeable for TrampolineForwardTlvs {
519
+ fn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
520
+ let features_opt = if self.features == BlindedHopFeatures::empty() {
521
+ None
522
+ } else {
523
+ Some(WithoutLength(&self.features))
524
+ };
525
+ encode_tlv_stream!(w, {
526
+ (4, self.next_trampoline, required),
527
+ (10, self.payment_relay, required),
528
+ (12, self.payment_constraints, required),
529
+ (14, features_opt, option)
530
+ });
531
+ Ok(())
532
+ }
533
+}
534
+
535
impl Writeable for ReceiveTlvs {
536
fn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
537
encode_tlv_stream!(w, {
0 commit comments