< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Messages.UpdateAddHtlcMessage
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Messages/UpdateAddHtlcMessage.cs
Tag: 30_15166811759
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 35
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Payload()100%11100%
get_BlindedPathTlv()100%11100%
.ctor(...)100%22100%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Messages/UpdateAddHtlcMessage.cs

#LineLine coverage
 1namespace NLightning.Domain.Protocol.Messages;
 2
 3using Constants;
 4using Models;
 5using Payloads;
 6using Tlv;
 7
 8/// <summary>
 9/// Represents a update_add_htlc message.
 10/// </summary>
 11/// <remarks>
 12/// The update_add_htlc message offers a new htlc to the peer.
 13/// The message type is 128.
 14/// </remarks>
 15public sealed class UpdateAddHtlcMessage : BaseMessage
 16{
 17    /// <summary>
 18    /// The payload of the message.
 19    /// </summary>
 6420    public new UpdateAddHtlcPayload Payload { get => (UpdateAddHtlcPayload)base.Payload; }
 21
 4022    public BlindedPathTlv? BlindedPathTlv { get; }
 23
 24    public UpdateAddHtlcMessage(UpdateAddHtlcPayload payload, BlindedPathTlv? blindedPathTlv = null)
 2425        : base(MessageTypes.UPDATE_ADD_HTLC, payload)
 26    {
 2427        BlindedPathTlv = blindedPathTlv;
 28
 2429        if (BlindedPathTlv is not null)
 30        {
 831            Extension = new TlvStream();
 832            Extension.Add(BlindedPathTlv);
 33        }
 2434    }
 35}