< 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: 30_15166811759
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 50
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 Interfaces;
 4using Money;
 5using ValueObjects;
 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(LightningMoney amount, ChannelId channelId, uint cltvExpiry, ulong id,
 2815                                  ReadOnlyMemory<byte> paymentHash, ReadOnlyMemory<byte>? onionRoutingPacket = null)
 16    : IMessagePayload
 17{
 18    /// <summary>
 19    /// Gets the channel ID.
 20    /// </summary>
 5221    public ChannelId ChannelId { get; } = channelId;
 22
 23    /// <summary>
 24    /// Offer Id
 25    /// </summary>
 26    /// <remarks>
 27    ///  This should be 0 for the first offer for the channel and must be incremented by 1 for each successive offer
 28    /// </remarks>
 5229    public ulong Id { get; } = id;
 30
 31    /// <summary>
 32    /// AmountSats offered for this Htlc
 33    /// </summary>
 5234    public LightningMoney Amount { get; } = amount;
 35
 36    /// <summary>
 37    /// The payment hash
 38    /// </summary>
 5239    public ReadOnlyMemory<byte> PaymentHash { get; } = paymentHash;
 40
 41    /// <summary>
 42    /// The Cltv Expiration
 43    /// </summary>
 5244    public uint CltvExpiry { get; } = cltvExpiry;
 45
 46    /// <summary>
 47    ///
 48    /// </summary>
 4849    public ReadOnlyMemory<byte>? OnionRoutingPacket { get; } = onionRoutingPacket;
 50}