]> git.bitcoin.ninja Git - rust-lightning/commit
Pass Route to send_payment as a reference, not move 2020-01-mpp
authorMatt Corallo <git@bluematt.me>
Tue, 7 Apr 2020 17:36:58 +0000 (13:36 -0400)
committerMatt Corallo <git@bluematt.me>
Wed, 15 Apr 2020 00:50:42 +0000 (20:50 -0400)
commit59b1bf6d0f718b2bef7ff44b5d2fc5bddce27b3b
tree8f088af5b39c295150247407ec06db6759988a7e
parentd3b6083ea283d865af7236c600ad3df1ab0b19df
Pass Route to send_payment as a reference, not move

ChannelManager::send_payment stopped utilizing its ownership of the
Route with MPP (which, for readability, now clone()s the individual
paths when creating HTLCSource::OutboundRoute objects). While this
isn't ideal, it likely also makes sense to ensure that the user has
access to the Route after sending to correlate individual path
failures with the paths in the route or, in the future, retry
individual paths.

Thus, the easiest solution is to just take the Route by reference,
allowing the user to retain ownership.
fuzz/src/chanmon_consistency.rs
fuzz/src/full_stack.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