]> git.bitcoin.ninja Git - rust-lightning/commit
Make `send_payment_with_route` take `Route` by value 2024-08-deprecate-send_payment
authorMatt Corallo <git@bluematt.me>
Sun, 4 Aug 2024 15:15:11 +0000 (15:15 +0000)
committerMatt Corallo <git@bluematt.me>
Sun, 4 Aug 2024 18:08:49 +0000 (18:08 +0000)
commit753a7ac8f2a7674754ea9517f6c5d2c60bc3ac36
tree8c1f219ec8d9366777d9e7e980bc396c5a177831
parentbebd9d0fed13fe4b4766c4cd484d59377f154be9
Make `send_payment_with_route` take `Route` by value

Now that `ChannelManager::send_payment_with_route` is deprecated,
we don't care too much about making it as effecient as possible, so
there's not much cost to making it take `Route` by value. This
avoids bindings being unsure if the by-reference `Route` passed
needs to outlive the `ChannelManager` itself or if it only needs to
outlive the method call, creating some call overhead by forcing a
`Route::clone`, but avoiding a memory leak.
13 files changed:
fuzz/src/chanmon_consistency.rs
lightning/src/chain/channelmonitor.rs
lightning/src/ln/async_signer_tests.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/monitor_tests.rs
lightning/src/ln/onion_route_tests.rs
lightning/src/ln/payment_tests.rs
lightning/src/ln/priv_short_conf_tests.rs
lightning/src/ln/reload_tests.rs
lightning/src/ln/shutdown_tests.rs