]> git.bitcoin.ninja Git - rust-lightning/commit
Use a single iterator to construct a BlindedPath
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 16 Aug 2024 02:37:03 +0000 (21:37 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Tue, 20 Aug 2024 21:47:33 +0000 (16:47 -0500)
commit2787ffef1eda6abcb7eca9eff3ab3205cb70cd6e
tree3ed07c8f1815f15936dbfe0a3f30f93f8970c50d
parentb28fc402604d368bda454a85e0327a0cc416ebb9
Use a single iterator to construct a BlindedPath

Instead of using separate iterators for pubkeys and TLVs, use an
iterator that yields a tuple of them. This allows for holding a mutable
reference to the TLVs such that they can be padded. With two iterators,
the pubkey iterator would have a reference to the ForwardNode slice when
constructing a payment path. However, this would prevent holding mutable
references in the TLVs iterator.
lightning/src/blinded_path/message.rs
lightning/src/blinded_path/payment.rs
lightning/src/blinded_path/utils.rs
lightning/src/ln/blinded_payment_tests.rs