]> git.bitcoin.ninja Git - rust-lightning/commit
Have `find_route` take a `NetworkGraph` instead of a `ReadOnly` one 2022-06-no-ro-graph
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:45:49 +0000 (17:45 +0000)
commit87a6e013f704ad905cb32452f53b264e9b322918
treee7863217490913ef6367d78f3c1bc184212f3ec6
parenta600eee87c96ee8865402e86bb1865011bf2d2de
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