Skip to content

Commit dc0b7b7

Browse files
committed
f - use LN_MAX_MSG_LEN
1 parent 0e30acc commit dc0b7b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/channel.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ use crate::chain::transaction::{OutPoint, TransactionData};
3939
use crate::chain::BestBlock;
4040
use crate::events::bump_transaction::BASE_INPUT_WEIGHT;
4141
use crate::events::{ClosureReason, Event};
42-
use crate::ln::chan_utils;
4342
#[cfg(splicing)]
4443
use crate::ln::chan_utils::FUNDING_TRANSACTION_WITNESS_WEIGHT;
4544
use crate::ln::chan_utils::{
@@ -72,6 +71,7 @@ use crate::ln::onion_utils::{
7271
};
7372
use crate::ln::script::{self, ShutdownScript};
7473
use crate::ln::types::ChannelId;
74+
use crate::ln::{chan_utils, LN_MAX_MSG_LEN};
7575
use crate::routing::gossip::NodeId;
7676
use crate::sign::ecdsa::EcdsaChannelSigner;
7777
use crate::sign::tx_builder::{SpecTxBuilder, TxBuilder};
@@ -10686,7 +10686,7 @@ where
1068610686
shared_input_txid: None,
1068710687
};
1068810688
let message_len = MESSAGE_TEMPLATE.serialized_length() + tx.serialized_length();
10689-
if message_len > u16::MAX as usize {
10689+
if message_len > LN_MAX_MSG_LEN {
1069010690
return Err(APIError::APIMisuseError {
1069110691
err: format!("Funding input's prevtx is too large for tx_add_input"),
1069210692
});

0 commit comments

Comments
 (0)