mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-27 08:28:49 +01:00
When receiving an update_fulfill_htlc message, we immediately forward the claim backwards along the payment path before waiting for a full commitment_signed dance. This is great, but can cause duplicative claims if a node sends an update_fulfill_htlc message, disconnects, reconnects, and then has to re-send its update_fulfill_htlc message again. While there was code to handle this, it treated it as a channel error on the inbound channel, which is incorrect - this is an expected, albeit incredibly rare, condition. Instead, we handle these double-claims correctly, simply ignoring them. With debug_assertions enabled, we also check that the previous close of the same HTLC was a fulfill, and that we are not moving from a HTLC failure to an HTLC claim after its too late. A test is also added, which hits all three failure cases in `Channel::get_update_fulfill_htlc`. Found by the chanmon_consistency fuzzer. |
||
---|---|---|
.. | ||
chan_utils.rs | ||
chanmon_update_fail_tests.rs | ||
channel.rs | ||
channelmanager.rs | ||
features.rs | ||
functional_test_utils.rs | ||
functional_tests.rs | ||
mod.rs | ||
msgs.rs | ||
onion_route_tests.rs | ||
onion_utils.rs | ||
peer_channel_encryptor.rs | ||
peer_handler.rs | ||
reorg_tests.rs | ||
wire.rs |