4 tn=msg_$(echo $1 | sed 's/\([a-z0-9]\)\([A-Z]\)/\1_\2/g' | tr '[:upper:]' '[:lower:]')
6 cat msg_target_template.txt | sed s/MSG_TARGET/$1/ | sed "s/TARGET_NAME/$tn/" | sed "s/TEST_MSG/$2/" | sed "s/EXTRA_ARGS/$3/" > $fn
7 echo "pub mod $tn;" >> mod.rs
10 echo "mod utils;" > mod.rs
12 # Note when adding new targets here you should add a similar line in src/bin/gen_target.sh
14 GEN_TEST AcceptChannel test_msg ""
15 GEN_TEST AnnouncementSignatures test_msg ""
16 GEN_TEST ChannelReestablish test_msg ""
17 GEN_TEST ClosingSigned test_msg ""
18 GEN_TEST CommitmentSigned test_msg ""
19 GEN_TEST DecodedOnionErrorPacket test_msg ""
20 GEN_TEST FundingCreated test_msg ""
21 GEN_TEST FundingLocked test_msg ""
22 GEN_TEST FundingSigned test_msg ""
23 GEN_TEST OpenChannel test_msg ""
24 GEN_TEST RevokeAndACK test_msg ""
25 GEN_TEST Shutdown test_msg ""
26 GEN_TEST UpdateFailHTLC test_msg ""
27 GEN_TEST UpdateFailMalformedHTLC test_msg ""
28 GEN_TEST UpdateFee test_msg ""
29 GEN_TEST UpdateFulfillHTLC test_msg ""
31 GEN_TEST ChannelAnnouncement test_msg_exact ""
32 GEN_TEST NodeAnnouncement test_msg_exact ""
33 GEN_TEST QueryShortChannelIds test_msg ""
34 GEN_TEST ReplyShortChannelIdsEnd test_msg ""
35 GEN_TEST QueryChannelRange test_msg ""
36 GEN_TEST ReplyChannelRange test_msg ""
37 GEN_TEST GossipTimestampFilter test_msg ""
39 GEN_TEST UpdateAddHTLC test_msg_hole ", 85, 33"
40 GEN_TEST ErrorMessage test_msg_hole ", 32, 2"
41 GEN_TEST ChannelUpdate test_msg_hole ", 108, 1"
43 GEN_TEST Init test_msg_simple ""
44 GEN_TEST OnionHopData test_msg_simple ""
45 GEN_TEST Ping test_msg_simple ""
46 GEN_TEST Pong test_msg_simple ""