mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-26 15:42:52 +01:00
Summary: Implementing these, taking inspiration from the surrounding code since i'm a rust n00b. Test Plan: ``` cargo build cargo test channel_reestablish ``` output: ``` running 3 tests test ln::msgs::tests::encoding_channel_reestablish_with_secret ... ok test ln::msgs::tests::decode_channel_reestablish_bad_length ... ok test ln::msgs::tests::encoding_channel_reestablish_no_secret ... ok test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 14 filtered out ```
5 lines
427 B
Bash
Executable file
5 lines
427 B
Bash
Executable file
for target in CommitmentSigned FundingCreated FundingLocked FundingSigned OpenChannel RevokeAndACK Shutdown UpdateAddHTLC 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
|