< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Payloads.AcceptChannel2Payload
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Payloads/AcceptChannel2Payload.cs
Tag: 36_15743069263
Line coverage
100%
Covered lines: 29
Uncovered lines: 0
Coverable lines: 29
Total lines: 104
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Payloads/AcceptChannel2Payload.cs

#LineLine coverage
 1namespace NLightning.Domain.Protocol.Payloads;
 2
 3using Channels.ValueObjects;
 4using Crypto.ValueObjects;
 5using Interfaces;
 6using Money;
 7
 8/// <summary>
 9/// Represents the payload for the accept_channel2 message.
 10/// </summary>
 11/// <remarks>
 12/// Initializes a new instance of the AcceptChannel2Payload class.
 13/// </remarks>
 2014public class AcceptChannel2Payload(
 2015    CompactPubKey delayedPaymentCompactBasepoint,
 2016    LightningMoney dustLimitAmount,
 2017    CompactPubKey firstPerCommitmentCompactPoint,
 2018    LightningMoney fundingAmount,
 2019    CompactPubKey fundingCompactPubKey,
 2020    CompactPubKey htlcCompactBasepoint,
 2021    LightningMoney htlcMinimumAmount,
 2022    ushort maxAcceptedHtlcs,
 2023    LightningMoney maxHtlcValueInFlight,
 2024    uint minimumDepth,
 2025    CompactPubKey paymentCompactBasepoint,
 2026    CompactPubKey revocationCompactBasepoint,
 2027    ChannelId channelId,
 2028    ushort toSelfDelay) : IChannelMessagePayload
 29{
 30    /// <summary>
 31    /// The temporary_channel_id is used to identify this channel on a per-peer basis until the funding transaction
 32    /// is established, at which point it is replaced by the channel_id, which is derived from the funding transaction.
 33    /// </summary>
 3634    public ChannelId ChannelId { get; } = channelId;
 35
 36    /// <summary>
 37    /// funding_satoshis is the amount the acceptor is putting into the channel.
 38    /// </summary>
 3639    public LightningMoney FundingAmount { get; } = fundingAmount;
 40
 41    /// <summary>
 42    /// dust_limit_satoshis is the threshold below which outputs should not be generated for this node's commitment or
 43    /// HTLC transactions
 44    /// </summary>
 3645    public LightningMoney DustLimitAmount { get; } = dustLimitAmount;
 46
 47    /// <summary>
 48    /// max_htlc_value_in_flight_msat is a cap on total value of outstanding HTLCs offered by the remote node, which
 49    /// allows the local node to limit its exposure to HTLCs
 50    /// </summary>
 3651    public LightningMoney MaxHtlcValueInFlightAmount { get; } = maxHtlcValueInFlight;
 52
 53    /// <summary>
 54    /// htlc_minimum_msat indicates the smallest value HTLC this node will accept.
 55    /// </summary>
 3656    public LightningMoney HtlcMinimumAmount { get; } = htlcMinimumAmount;
 57
 58    /// <summary>
 59    /// minimum_depth is the number of blocks we consider reasonable to avoid double-spending of the funding transaction
 60    /// In case channel_type includes option_zeroconf this MUST be 0
 61    /// </summary>
 3662    public uint MinimumDepth { get; } = minimumDepth;
 63
 64    /// <summary>
 65    /// to_self_delay is how long (in blocks) the other node will have to wait in case of breakdown before redeeming
 66    /// its own funds.
 67    /// </summary>
 3668    public ushort ToSelfDelay { get; } = toSelfDelay;
 69
 70    /// <summary>
 71    /// max_accepted_htlcs limits the number of outstanding HTLCs the remote node can offer.
 72    /// </summary>
 3673    public ushort MaxAcceptedHtlcs { get; } = maxAcceptedHtlcs;
 74
 75    /// <summary>
 76    /// funding_pubkey is the public key in the 2-of-2 multisig script of the funding transaction output.
 77    /// </summary>
 3678    public CompactPubKey FundingCompactPubKey { get; } = fundingCompactPubKey;
 79
 80    /// <summary>
 81    /// revocation_basepoint is used to regenerate the scripts required for the penalty transaction
 82    /// </summary>
 3683    public CompactPubKey RevocationCompactBasepoint { get; } = revocationCompactBasepoint;
 84
 85    /// <summary>
 86    /// payment_basepoint is used to produce payment signatures for the protocol
 87    /// </summary>
 3688    public CompactPubKey PaymentCompactBasepoint { get; } = paymentCompactBasepoint;
 89
 90    /// <summary>
 91    /// delayed_payment_basepoint is used to regenerate the scripts required for the penalty transaction
 92    /// </summary>
 3693    public CompactPubKey DelayedPaymentCompactBasepoint { get; } = delayedPaymentCompactBasepoint;
 94
 95    /// <summary>
 96    /// htlc_basepoint is used to produce HTLC signatures for the protocol
 97    /// </summary>
 3698    public CompactPubKey HtlcCompactBasepoint { get; } = htlcCompactBasepoint;
 99
 100    /// <summary>
 101    /// first_per_commitment_point is the per-commitment point used for the first commitment transaction
 102    /// </summary>
 36103    public CompactPubKey FirstPerCommitmentCompactPoint { get; } = firstPerCommitmentCompactPoint;
 104}