@@ -211,7 +211,7 @@ pub(super) fn construct_onion_packet(payloads: Vec<msgs::OnionHopData>, onion_ke
211
211
/// Constructs the onion routing packet for onion messages.
212
212
// NOTE: this could prob be DRY'd with `construct_onion_packet`, but it'd lead to a large-ish diff,
213
213
// and it's a small method.
214
- pub ( super ) fn construct_onion_message_packet ( payloads : Vec < onion_message:: Payload > , onion_packet_keys : Vec < OnionKeys > , prng_seed : [ u8 ; 32 ] ) -> msgs :: OnionPacket {
214
+ pub ( super ) fn construct_onion_message_packet ( payloads : Vec < onion_message:: Payload > , onion_packet_keys : Vec < OnionKeys > , prng_seed : [ u8 ; 32 ] ) -> onion_message :: Packet {
215
215
// calls:
216
216
// * construct_onion_packet_with_init_noise
217
217
}
@@ -228,8 +228,12 @@ pub(super) fn construct_onion_packet_bogus_hopdata<HD: Writeable>(payloads: Vec<
228
228
construct_onion_packet_with_init_noise ( payloads, onion_keys, packet_data, associated_data)
229
229
}
230
230
231
+ enum Packet {
232
+ Payment ( msgs:: OnionPacket ) ,
233
+ Message ( onion_message:: Packet ) ,
234
+ }
231
235
/// panics if route_size_insane(paylods)
232
- fn construct_onion_packet_with_init_noise < HD : Writeable > ( mut payloads : Vec < HD > , onion_keys : Vec < OnionKeys > , mut packet_data : [ u8 ; ONION_DATA_LEN ] , associated_data : Option < & PaymentHash > ) -> msgs :: OnionPacket {
236
+ fn construct_onion_packet_with_init_noise < HD : Writeable > ( mut payloads : Vec < HD > , onion_keys : Vec < OnionKeys > , mut packet_data : [ u8 ; ONION_DATA_LEN ] , associated_data : Option < & PaymentHash > ) -> Packet {
233
237
// calls `onion_messages::Payload::write`
234
238
let filler = {
235
239
const ONION_HOP_DATA_LEN : usize = 65 ; // We may decrease this eventually after TLV is common
0 commit comments