< 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: 30_15166811759
Line coverage
100%
Covered lines: 19
Uncovered lines: 0
Coverable lines: 19
Total lines: 96
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

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_TemporaryChannelId()100%11100%
get_FundingAmount()100%11100%
get_DustLimitAmount()100%11100%
get_MaxHtlcValueInFlightAmount()100%11100%
get_HtlcMinimumAmount()100%11100%
get_MinimumDepth()100%11100%
get_ToSelfDelay()100%11100%
get_MaxAcceptedHtlcs()100%11100%
get_FundingPubKey()100%11100%
get_RevocationBasepoint()100%11100%
get_PaymentBasepoint()100%11100%
get_DelayedPaymentBasepoint()100%11100%
get_HtlcBasepoint()100%11100%
get_FirstPerCommitmentPoint()100%11100%

File(s)

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

#LineLine coverage
 1using NBitcoin;
 2
 3namespace NLightning.Domain.Protocol.Payloads;
 4
 5using Interfaces;
 6using Money;
 7using ValueObjects;
 8
 9/// <summary>
 10/// Represents the payload for the accept_channel2 message.
 11/// </summary>
 12/// <remarks>
 13/// Initializes a new instance of the AcceptChannel2Payload class.
 14/// </remarks>
 2015public class AcceptChannel2Payload(PubKey delayedPaymentBasepoint, LightningMoney dustLimitAmount,
 2016                                   PubKey firstPerCommitmentPoint, LightningMoney fundingAmount, PubKey fundingPubKey,
 2017                                   PubKey htlcBasepoint, LightningMoney htlcMinimumAmount, ushort maxAcceptedHtlcs,
 2018                                   LightningMoney maxHtlcValueInFlight, uint minimumDepth, PubKey paymentBasepoint,
 2019                                   PubKey revocationBasepoint, ChannelId temporaryChannelId, ushort toSelfDelay)
 20    : IMessagePayload
 21{
 22    /// <summary>
 23    /// The temporary_channel_id is used to identify this channel on a per-peer basis until the funding transaction
 24    /// is established, at which point it is replaced by the channel_id, which is derived from the funding transaction.
 25    /// </summary>
 3626    public ChannelId TemporaryChannelId { get; } = temporaryChannelId;
 27
 28    /// <summary>
 29    /// funding_satoshis is the amount the acceptor is putting into the channel.
 30    /// </summary>
 3631    public LightningMoney FundingAmount { get; } = fundingAmount;
 32
 33    /// <summary>
 34    /// dust_limit_satoshis is the threshold below which outputs should not be generated for this node's commitment or
 35    /// HTLC transactions
 36    /// </summary>
 3637    public LightningMoney DustLimitAmount { get; } = dustLimitAmount;
 38
 39    /// <summary>
 40    /// max_htlc_value_in_flight_msat is a cap on total value of outstanding HTLCs offered by the remote node, which
 41    /// allows the local node to limit its exposure to HTLCs
 42    /// </summary>
 3643    public LightningMoney MaxHtlcValueInFlightAmount { get; } = maxHtlcValueInFlight;
 44
 45    /// <summary>
 46    /// htlc_minimum_msat indicates the smallest value HTLC this node will accept.
 47    /// </summary>
 3648    public LightningMoney HtlcMinimumAmount { get; } = htlcMinimumAmount;
 49
 50    /// <summary>
 51    /// minimum_depth is the number of blocks we consider reasonable to avoid double-spending of the funding transaction
 52    /// In case channel_type includes option_zeroconf this MUST be 0
 53    /// </summary>
 3654    public uint MinimumDepth { get; } = minimumDepth;
 55
 56    /// <summary>
 57    /// to_self_delay is how long (in blocks) the other node will have to wait in case of breakdown before redeeming
 58    /// its own funds.
 59    /// </summary>
 3660    public ushort ToSelfDelay { get; } = toSelfDelay;
 61
 62    /// <summary>
 63    /// max_accepted_htlcs limits the number of outstanding HTLCs the remote node can offer.
 64    /// </summary>
 3665    public ushort MaxAcceptedHtlcs { get; } = maxAcceptedHtlcs;
 66
 67    /// <summary>
 68    /// funding_pubkey is the public key in the 2-of-2 multisig script of the funding transaction output.
 69    /// </summary>
 3670    public PubKey FundingPubKey { get; } = fundingPubKey;
 71
 72    /// <summary>
 73    /// revocation_basepoint is used to regenerate the scripts required for the penalty transaction
 74    /// </summary>
 3675    public PubKey RevocationBasepoint { get; } = revocationBasepoint;
 76
 77    /// <summary>
 78    /// payment_basepoint is used to produce payment signatures for the protocol
 79    /// </summary>
 3680    public PubKey PaymentBasepoint { get; } = paymentBasepoint;
 81
 82    /// <summary>
 83    /// delayed_payment_basepoint is used to regenerate the scripts required for the penalty transaction
 84    /// </summary>
 3685    public PubKey DelayedPaymentBasepoint { get; } = delayedPaymentBasepoint;
 86
 87    /// <summary>
 88    /// htlc_basepoint is used to produce HTLC signatures for the protocol
 89    /// </summary>
 3690    public PubKey HtlcBasepoint { get; } = htlcBasepoint;
 91
 92    /// <summary>
 93    /// first_per_commitment_point is the per-commitment point used for the first commitment transaction
 94    /// </summary>
 3695    public PubKey FirstPerCommitmentPoint { get; } = firstPerCommitmentPoint;
 96}