]> git.bitcoin.ninja Git - rust-lightning/commit
Add HTLCsTimedOut closing reason
authorbenthecarman <benthecarman@live.com>
Tue, 20 Feb 2024 18:47:50 +0000 (18:47 +0000)
committerbenthecarman <benthecarman@live.com>
Tue, 19 Mar 2024 23:57:15 +0000 (18:57 -0500)
commit9b5ebc4bec7e8aa01de26b855c0939fcf698c994
tree62ed873f1b35405da70260d137d2d03106557f55
parent2c9dbb959d0c16ee97baf70074d0a31a0c0443e8
Add HTLCsTimedOut closing reason

Before a force closure from timed out HTLCs was treated the same as when
the user manually force closed the channel. This leads to various UX
issues. This adds a new `ClosureReason` called `HTLCsTimedOut` that
signifies that the closure was caused because the HTLCs timed out. To go
along with this, previously we'd always send "Channel force-closed" when
force closing the channel in the error message which was ambigous, now
we send the force closure reason so the peer can know why the channel
was closed.
lightning/src/chain/channelmonitor.rs
lightning/src/events/mod.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/monitor_tests.rs
lightning/src/ln/reorg_tests.rs