Skip to content

[Splicing] Partial, handle splice_init & splice_ack messages #3407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions lightning/src/ln/chan_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,27 @@ pub const HTLC_TIMEOUT_INPUT_ANCHOR_WITNESS_WEIGHT: u64 = 288;
/// outputs.
pub const HTLC_SUCCESS_INPUT_ANCHOR_WITNESS_WEIGHT: u64 = 327;

/// The size of the 2-of-2 multisig script
const MULTISIG_SCRIPT_SIZE: u64 =
1 + // OP_2
1 + // data len
33 + // pubkey1
1 + // data len
33 + // pubkey2
1 + // OP_2
1; // OP_CHECKMULTISIG
/// The weight of a funding transaction input (2-of-2 P2WSH)
/// See https://github.com/lightning/bolts/blob/master/03-transactions.md#expected-weight-of-the-commitment-transaction
pub const FUNDING_TRANSACTION_WITNESS_WEIGHT: u64 =
1 + // number_of_witness_elements
1 + // nil_len
1 + // sig len
73 + // sig1
1 + // sig len
73 + // sig2
1 + // witness_script_length
MULTISIG_SCRIPT_SIZE;

/// Gets the weight for an HTLC-Success transaction.
#[inline]
pub fn htlc_success_tx_weight(channel_type_features: &ChannelTypeFeatures) -> u64 {
Expand Down
Loading
Loading