@@ -60,7 +60,7 @@ use crate::routing::gossip::NodeId;
6060use crate::routing::router::{BlindedTail, FixedRouter, InFlightHtlcs, Path, Payee, PaymentParameters, Route, RouteParameters, Router};
6161use crate::ln::onion_payment::{check_incoming_htlc_cltv, create_recv_pending_htlc_info, create_fwd_pending_htlc_info, decode_incoming_update_add_htlc_onion, InboundHTLCErr, NextPacketDetails};
6262use crate::ln::msgs;
63- use crate::ln::onion_utils;
63+ use crate::ln::onion_utils::{self, ATTRIBUTION_DATA_LEN} ;
6464use crate::ln::onion_utils::{HTLCFailReason, INVALID_ONION_BLINDING};
6565use crate::ln::msgs::{ChannelMessageHandler, CommitmentUpdate, DecodeError, LightningError};
6666#[cfg(test)]
@@ -13125,7 +13125,7 @@ impl Writeable for HTLCForwardInfo {
1312513125 // packet so older versions have something to fail back with, but serialize the real data as
1312613126 // optional TLVs for the benefit of newer versions.
1312713127 FAIL_HTLC_VARIANT_ID.write(w)?;
13128- let dummy_err_packet = msgs::OnionErrorPacket { data: Vec::new(), attribution_data: [0; 940 ] };
13128+ let dummy_err_packet = msgs::OnionErrorPacket { data: Vec::new(), attribution_data: [0; ATTRIBUTION_DATA_LEN ] };
1312913129 write_tlv_fields!(w, {
1313013130 (0, htlc_id, required),
1313113131 (1, failure_code, required),
@@ -14858,7 +14858,8 @@ mod tests {
1485814858 use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
1485914859 use core::sync::atomic::Ordering;
1486014860 use crate::events::{Event, HTLCDestination, MessageSendEvent, MessageSendEventsProvider, ClosureReason};
14861- use crate::ln::types::ChannelId;
14861+ use crate::ln::onion_utils::ATTRIBUTION_DATA_LEN;
14862+ use crate::ln::types::ChannelId;
1486214863 use crate::types::payment::{PaymentPreimage, PaymentHash, PaymentSecret};
1486314864 use crate::ln::channelmanager::{create_recv_pending_htlc_info, inbound_payment, ChannelConfigOverrides, HTLCForwardInfo, InterceptId, PaymentId, RecipientOnionFields};
1486414865 use crate::ln::functional_test_utils::*;
@@ -16290,7 +16291,7 @@ mod tests {
1629016291 let mut nodes = create_network(1, &node_cfg, &chanmgrs);
1629116292
1629216293 let dummy_failed_htlc = |htlc_id| {
16293- HTLCForwardInfo::FailHTLC { htlc_id, err_packet: msgs::OnionErrorPacket { data: vec![42], attribution_data: [0; 940 ] } }
16294+ HTLCForwardInfo::FailHTLC { htlc_id, err_packet: msgs::OnionErrorPacket { data: vec![42], attribution_data: [0; ATTRIBUTION_DATA_LEN ] } }
1629416295 };
1629516296 let dummy_malformed_htlc = |htlc_id| {
1629616297 HTLCForwardInfo::FailMalformedHTLC { htlc_id, failure_code: 0x4000, sha256_of_onion: [0; 32] }
0 commit comments