]> git.bitcoin.ninja Git - rust-lightning/commit
Fix bug where we encode flags field into all updates on htlc fail
authorValentine Wallace <vwallace@protonmail.com>
Thu, 24 Feb 2022 03:20:43 +0000 (22:20 -0500)
committerValentine Wallace <vwallace@protonmail.com>
Thu, 24 Feb 2022 03:33:45 +0000 (22:33 -0500)
commitb32e9553abcb1d9312353fc6cf1f99a54228840f
tree0c5c7c93669690d28bfa910115fd3e7adf1dc603
parenta05d46525e880ec8125f74b6f4de464e5dfbb9eb
Fix bug where we encode flags field into all updates on htlc fail

Failing an HTLC with onion error channel_disabled requires encoding a 'flags' field into the failure
packet. However, we were encoding this 'flags' field for all failures packets that were failing on
update_add_htlc with an update (error 0x1000 UPDATE).

Discovered in the course of adding phantom payment failure tests, which also added testing for this bug
lightning/src/ln/channelmanager.rs
lightning/src/ln/onion_route_tests.rs