]> git.bitcoin.ninja Git - rust-lightning/commit
Move pending payment tracking to after the new HTLC flies
authorMatt Corallo <git@bluematt.me>
Mon, 4 Oct 2021 04:47:33 +0000 (04:47 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 7 Oct 2021 22:27:58 +0000 (22:27 +0000)
commit928bfb12d2d0d02ae0b5a68a81a6b4a651561c69
treedee3b076b344d5ab5b7f6d61ac0a9d5e4023ccb7
parentbb4ff74da13dcfded20d29aff7d0f8d4afd5505d
Move pending payment tracking to after the new HTLC flies

If we attempt to send a payment, but the HTLC cannot be send due to
local channel limits, we'll provide the user an error but end up
with an entry in our pending payment map. This will result in a
memory leak as we'll never reclaim the pending payment map entry.
lightning/src/ln/channelmanager.rs
lightning/src/ln/payment_tests.rs