# Note when adding new targets here you should add a similar line in src/bin/gen_target.sh
-GEN_TEST AcceptChannel test_msg ""
-GEN_TEST AnnouncementSignatures test_msg ""
+GEN_TEST AcceptChannel test_msg_simple ""
+GEN_TEST AnnouncementSignatures test_msg_simple ""
+GEN_TEST ClosingSigned test_msg_simple ""
+GEN_TEST CommitmentSigned test_msg_simple ""
+GEN_TEST FundingCreated test_msg_simple ""
+GEN_TEST FundingLocked test_msg_simple ""
+GEN_TEST FundingSigned test_msg_simple ""
+GEN_TEST GossipTimestampFilter test_msg_simple ""
+GEN_TEST Init test_msg_simple ""
+GEN_TEST OnionHopData test_msg_simple ""
+GEN_TEST OpenChannel test_msg_simple ""
+GEN_TEST Ping test_msg_simple ""
+GEN_TEST Pong test_msg_simple ""
+GEN_TEST QueryChannelRange test_msg_simple ""
+GEN_TEST ReplyShortChannelIdsEnd test_msg_simple ""
+GEN_TEST RevokeAndACK test_msg_simple ""
+GEN_TEST Shutdown test_msg_simple ""
+GEN_TEST UpdateAddHTLC test_msg_simple ""
+GEN_TEST UpdateFailHTLC test_msg_simple ""
+GEN_TEST UpdateFailMalformedHTLC test_msg_simple ""
+GEN_TEST UpdateFee test_msg_simple ""
+GEN_TEST UpdateFulfillHTLC test_msg_simple ""
+
GEN_TEST ChannelReestablish test_msg ""
-GEN_TEST CommitmentSigned test_msg ""
GEN_TEST DecodedOnionErrorPacket test_msg ""
-GEN_TEST FundingCreated test_msg ""
-GEN_TEST FundingLocked test_msg ""
-GEN_TEST FundingSigned test_msg ""
-GEN_TEST OpenChannel test_msg ""
-GEN_TEST RevokeAndACK test_msg ""
-GEN_TEST Shutdown test_msg ""
-GEN_TEST UpdateFailHTLC test_msg ""
-GEN_TEST UpdateFailMalformedHTLC test_msg ""
-GEN_TEST UpdateFee test_msg ""
-GEN_TEST UpdateFulfillHTLC test_msg ""
GEN_TEST ChannelAnnouncement test_msg_exact ""
GEN_TEST NodeAnnouncement test_msg_exact ""
GEN_TEST QueryShortChannelIds test_msg ""
-GEN_TEST ReplyShortChannelIdsEnd test_msg ""
-GEN_TEST QueryChannelRange test_msg ""
GEN_TEST ReplyChannelRange test_msg ""
-GEN_TEST GossipTimestampFilter test_msg ""
-GEN_TEST UpdateAddHTLC test_msg_hole ", 85, 33"
GEN_TEST ErrorMessage test_msg_hole ", 32, 2"
GEN_TEST ChannelUpdate test_msg_hole ", 108, 1"
-
-GEN_TEST ClosingSigned test_msg_simple ""
-GEN_TEST Init test_msg_simple ""
-GEN_TEST OnionHopData test_msg_simple ""
-GEN_TEST Ping test_msg_simple ""
-GEN_TEST Pong test_msg_simple ""
mod utils;
pub mod msg_accept_channel;
pub mod msg_announcement_signatures;
-pub mod msg_channel_reestablish;
+pub mod msg_closing_signed;
pub mod msg_commitment_signed;
-pub mod msg_decoded_onion_error_packet;
pub mod msg_funding_created;
pub mod msg_funding_locked;
pub mod msg_funding_signed;
+pub mod msg_gossip_timestamp_filter;
+pub mod msg_init;
+pub mod msg_onion_hop_data;
pub mod msg_open_channel;
+pub mod msg_ping;
+pub mod msg_pong;
+pub mod msg_query_channel_range;
+pub mod msg_reply_short_channel_ids_end;
pub mod msg_revoke_and_ack;
pub mod msg_shutdown;
+pub mod msg_update_add_htlc;
pub mod msg_update_fail_htlc;
pub mod msg_update_fail_malformed_htlc;
pub mod msg_update_fee;
pub mod msg_update_fulfill_htlc;
+pub mod msg_channel_reestablish;
+pub mod msg_decoded_onion_error_packet;
pub mod msg_channel_announcement;
pub mod msg_node_announcement;
pub mod msg_query_short_channel_ids;
-pub mod msg_reply_short_channel_ids_end;
-pub mod msg_query_channel_range;
pub mod msg_reply_channel_range;
-pub mod msg_gossip_timestamp_filter;
-pub mod msg_update_add_htlc;
pub mod msg_error_message;
pub mod msg_channel_update;
-pub mod msg_closing_signed;
-pub mod msg_init;
-pub mod msg_onion_hop_data;
-pub mod msg_ping;
-pub mod msg_pong;
#[inline]
pub fn msg_accept_channel_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::AcceptChannel, data);
+ test_msg_simple!(msgs::AcceptChannel, data);
}
#[no_mangle]
pub extern "C" fn msg_accept_channel_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::AcceptChannel, data);
+ test_msg_simple!(msgs::AcceptChannel, data);
}
#[inline]
pub fn msg_announcement_signatures_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::AnnouncementSignatures, data);
+ test_msg_simple!(msgs::AnnouncementSignatures, data);
}
#[no_mangle]
pub extern "C" fn msg_announcement_signatures_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::AnnouncementSignatures, data);
+ test_msg_simple!(msgs::AnnouncementSignatures, data);
}
#[inline]
pub fn msg_commitment_signed_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::CommitmentSigned, data);
+ test_msg_simple!(msgs::CommitmentSigned, data);
}
#[no_mangle]
pub extern "C" fn msg_commitment_signed_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::CommitmentSigned, data);
+ test_msg_simple!(msgs::CommitmentSigned, data);
}
#[inline]
pub fn msg_funding_created_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::FundingCreated, data);
+ test_msg_simple!(msgs::FundingCreated, data);
}
#[no_mangle]
pub extern "C" fn msg_funding_created_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::FundingCreated, data);
+ test_msg_simple!(msgs::FundingCreated, data);
}
#[inline]
pub fn msg_funding_locked_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::FundingLocked, data);
+ test_msg_simple!(msgs::FundingLocked, data);
}
#[no_mangle]
pub extern "C" fn msg_funding_locked_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::FundingLocked, data);
+ test_msg_simple!(msgs::FundingLocked, data);
}
#[inline]
pub fn msg_funding_signed_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::FundingSigned, data);
+ test_msg_simple!(msgs::FundingSigned, data);
}
#[no_mangle]
pub extern "C" fn msg_funding_signed_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::FundingSigned, data);
+ test_msg_simple!(msgs::FundingSigned, data);
}
#[inline]
pub fn msg_gossip_timestamp_filter_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::GossipTimestampFilter, data);
+ test_msg_simple!(msgs::GossipTimestampFilter, data);
}
#[no_mangle]
pub extern "C" fn msg_gossip_timestamp_filter_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::GossipTimestampFilter, data);
+ test_msg_simple!(msgs::GossipTimestampFilter, data);
}
#[inline]
pub fn msg_open_channel_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::OpenChannel, data);
+ test_msg_simple!(msgs::OpenChannel, data);
}
#[no_mangle]
pub extern "C" fn msg_open_channel_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::OpenChannel, data);
+ test_msg_simple!(msgs::OpenChannel, data);
}
#[inline]
pub fn msg_query_channel_range_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::QueryChannelRange, data);
+ test_msg_simple!(msgs::QueryChannelRange, data);
}
#[no_mangle]
pub extern "C" fn msg_query_channel_range_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::QueryChannelRange, data);
+ test_msg_simple!(msgs::QueryChannelRange, data);
}
#[inline]
pub fn msg_reply_short_channel_ids_end_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::ReplyShortChannelIdsEnd, data);
+ test_msg_simple!(msgs::ReplyShortChannelIdsEnd, data);
}
#[no_mangle]
pub extern "C" fn msg_reply_short_channel_ids_end_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::ReplyShortChannelIdsEnd, data);
+ test_msg_simple!(msgs::ReplyShortChannelIdsEnd, data);
}
#[inline]
pub fn msg_revoke_and_ack_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::RevokeAndACK, data);
+ test_msg_simple!(msgs::RevokeAndACK, data);
}
#[no_mangle]
pub extern "C" fn msg_revoke_and_ack_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::RevokeAndACK, data);
+ test_msg_simple!(msgs::RevokeAndACK, data);
}
#[inline]
pub fn msg_shutdown_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::Shutdown, data);
+ test_msg_simple!(msgs::Shutdown, data);
}
#[no_mangle]
pub extern "C" fn msg_shutdown_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::Shutdown, data);
+ test_msg_simple!(msgs::Shutdown, data);
}
#[inline]
pub fn msg_update_add_htlc_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg_hole!(msgs::UpdateAddHTLC, data, 85, 33);
+ test_msg_simple!(msgs::UpdateAddHTLC, data);
}
#[no_mangle]
pub extern "C" fn msg_update_add_htlc_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg_hole!(msgs::UpdateAddHTLC, data, 85, 33);
+ test_msg_simple!(msgs::UpdateAddHTLC, data);
}
#[inline]
pub fn msg_update_fail_htlc_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::UpdateFailHTLC, data);
+ test_msg_simple!(msgs::UpdateFailHTLC, data);
}
#[no_mangle]
pub extern "C" fn msg_update_fail_htlc_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::UpdateFailHTLC, data);
+ test_msg_simple!(msgs::UpdateFailHTLC, data);
}
#[inline]
pub fn msg_update_fail_malformed_htlc_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::UpdateFailMalformedHTLC, data);
+ test_msg_simple!(msgs::UpdateFailMalformedHTLC, data);
}
#[no_mangle]
pub extern "C" fn msg_update_fail_malformed_htlc_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::UpdateFailMalformedHTLC, data);
+ test_msg_simple!(msgs::UpdateFailMalformedHTLC, data);
}
#[inline]
pub fn msg_update_fee_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::UpdateFee, data);
+ test_msg_simple!(msgs::UpdateFee, data);
}
#[no_mangle]
pub extern "C" fn msg_update_fee_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::UpdateFee, data);
+ test_msg_simple!(msgs::UpdateFee, data);
}
#[inline]
pub fn msg_update_fulfill_htlc_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- test_msg!(msgs::UpdateFulfillHTLC, data);
+ test_msg_simple!(msgs::UpdateFulfillHTLC, data);
}
#[no_mangle]
pub extern "C" fn msg_update_fulfill_htlc_run(data: *const u8, datalen: usize) {
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
- test_msg!(msgs::UpdateFulfillHTLC, data);
+ test_msg_simple!(msgs::UpdateFulfillHTLC, data);
}