< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Payloads.UpdateAddHtlcPayload
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Payloads/UpdateAddHtlcPayload.cs
Tag: 36_15743069263
Line coverage
100%
Covered lines: 13
Uncovered lines: 0
Coverable lines: 13
Total lines: 55
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_ChannelId()100%11100%
get_Id()100%11100%
get_Amount()100%11100%
get_PaymentHash()100%11100%
get_CltvExpiry()100%11100%
get_OnionRoutingPacket()100%11100%

File(s)

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

#LineLine coverage
 1namespace NLightning.Domain.Protocol.Payloads;
 2
 3using Channels.ValueObjects;
 4using Interfaces;
 5using Money;
 6
 7/// <summary>
 8/// Represents the payload for the update_add_htlc message.
 9/// </summary>
 10/// <remarks>
 11/// Initializes a new instance of the TxAckRbfPayload class.
 12/// </remarks>
 13/// <param name="channelId">The channel ID.</param>
 2814public class UpdateAddHtlcPayload(
 2815    LightningMoney amount,
 2816    ChannelId channelId,
 2817    uint cltvExpiry,
 2818    ulong id,
 2819    ReadOnlyMemory<byte> paymentHash,
 2820    ReadOnlyMemory<byte>? onionRoutingPacket = null)
 21    : IChannelMessagePayload
 22{
 23    /// <summary>
 24    /// Gets the channel ID.
 25    /// </summary>
 5226    public ChannelId ChannelId { get; } = channelId;
 27
 28    /// <summary>
 29    /// Offer Id
 30    /// </summary>
 31    /// <remarks>
 32    ///  This should be 0 for the first offer for the channel and must be incremented by 1 for each successive offer
 33    /// </remarks>
 5234    public ulong Id { get; } = id;
 35
 36    /// <summary>
 37    /// AmountSats offered for this Htlc
 38    /// </summary>
 5239    public LightningMoney Amount { get; } = amount;
 40
 41    /// <summary>
 42    /// The payment hash
 43    /// </summary>
 5244    public ReadOnlyMemory<byte> PaymentHash { get; } = paymentHash;
 45
 46    /// <summary>
 47    /// The Cltv Expiration
 48    /// </summary>
 5249    public uint CltvExpiry { get; } = cltvExpiry;
 50
 51    /// <summary>
 52    ///
 53    /// </summary>
 4854    public ReadOnlyMemory<byte>? OnionRoutingPacket { get; } = onionRoutingPacket;
 55}