]> git.bitcoin.ninja Git - rust-lightning/commit
Have `find_route` take a `NetworkGraph` instead of a `ReadOnly` one 2022-06-no-ro-graph-bindings
authorMatt Corallo <git@bluematt.me>
Wed, 29 Jun 2022 17:41:30 +0000 (17:41 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 29 Jun 2022 17:53:47 +0000 (17:53 +0000)
commitcf1aeb81e21fa731fd62a5dda343474a91483700
treebce9a7f96e34bd950d76f9e0d65ed2f870bab20c
parentdbea7ff507708b8087201ce82e7c74ff31f209ac
Have `find_route` take a `NetworkGraph` instead of a `ReadOnly` one

Because downstream languages are often garbage-collected, having
the user directly allocate a `ReadOnlyNetworkGraph` and pass a
reference to it to `find_route` often results in holding a read
lock long in excess of the `find_route` call. Worse, some languages
(like JavaScript) tend to only garbage collect when other code is
not running, possibly leading to deadlocks.
fuzz/src/full_stack.rs
fuzz/src/router.rs
lightning-invoice/src/utils.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_tests.rs
lightning/src/routing/router.rs
lightning/src/routing/scoring.rs