]> git.bitcoin.ninja Git - rust-lightning/commit
Stop relying on a `Clone`able `NetworkGraph` ref in `DefaultRouter` 2024-08-unclonable-graph
authorMatt Corallo <git@bluematt.me>
Mon, 12 Aug 2024 01:03:00 +0000 (01:03 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 12 Aug 2024 01:03:42 +0000 (01:03 +0000)
commit9de7c1db3b538c2724d3aa6f4b35f4ec1fddf4ac
tree886947c8bfd8492503a70d62f6226dc1f5303487
parent4950f3cfc874561bd154a8325b0395bee7e260a2
Stop relying on a `Clone`able `NetworkGraph` ref in `DefaultRouter`

While there's not really much harm in requiring a `Clone`able
reference (they almost always are), it does make our bindings
struggle a bit as they don't support multi-trait bounds (as it
would require synthesizing a new C trait, which the bindings don't
do automatically). Luckily, there's really no reason for it, and we
can just call the `DefaultMessageRouter` directly when we want to
route a message.

We've carried this patch for a while on the bindings branch, but
there's not a strong reason it can't go upstream.
lightning/src/onion_message/messenger.rs
lightning/src/routing/router.rs