]> 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>
Fri, 25 Feb 2022 03:33:35 +0000 (22:33 -0500)
commit694ef1ecb9be7e0cc952729e2c7e232036ce8173
tree83c0de5d2236082fa0fdff3fe26251d4096a5260
parent26fe87989607ff459b7f30cd676a6a2b9f8cf1b0
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