mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-26 15:42:52 +01:00
This resolves a spec-compliance bug with BOLT 4 where we simply failed to deserialize the message and thus could never return an HTLC failure message. However, note that BOLT 4 incorrectly hints that a non-malformed message should be used ("...MUST report a route failure to the origin node") which we cannot do as we cannot derive a SharedSecret to encrypt a regular update_fail_htlc message
5 lines
413 B
Bash
Executable file
5 lines
413 B
Bash
Executable file
for target in CommitmentSigned FundingCreated FundingLocked FundingSigned OpenChannel RevokeAndACK Shutdown UpdateFailHTLC UpdateFailMalformedHTLC UpdateFee UpdateFulfillHTLC AcceptChannel ClosingSigned ChannelReestablish; do
|
|
tn=$(echo $target | sed 's/\([a-z0-9]\)\([A-Z]\)/\1_\2/g')
|
|
fn=msg_$(echo $tn | tr '[:upper:]' '[:lower:]')_target.rs
|
|
cat msg_target_template.txt | sed s/MSG_TARGET/$target/ > $fn
|
|
done
|