< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Messages.OpenChannel2Message
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Messages/OpenChannel2Message.cs
Tag: 30_15166811759
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 39
Line coverage: 100%
Branch coverage
100%
Covered branches: 6
Total branches: 6
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_UpfrontShutdownScriptTlv()100%11100%
get_ChannelTypeTlv()100%11100%
get_RequireConfirmedInputsTlv()100%11100%
.ctor(...)100%66100%

File(s)

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

#LineLine coverage
 1namespace NLightning.Domain.Protocol.Messages;
 2
 3using Constants;
 4using Models;
 5using Payloads;
 6using Tlv;
 7
 8/// <summary>
 9/// Represents an open_channel2 message.
 10/// </summary>
 11/// <remarks>
 12/// The open_channel2 message is sent to another peer in order to start the channel negotiation.
 13/// The message type is 64.
 14/// </remarks>
 15public sealed class OpenChannel2Message : BaseMessage
 16{
 17    /// <summary>
 18    /// The payload of the message.
 19    /// </summary>
 15220    public new OpenChannel2Payload Payload { get => (OpenChannel2Payload)base.Payload; }
 21
 3222    public UpfrontShutdownScriptTlv? UpfrontShutdownScriptTlv { get; }
 2423    public ChannelTypeTlv? ChannelTypeTlv { get; }
 2024    public RequireConfirmedInputsTlv? RequireConfirmedInputsTlv { get; }
 25
 26    public OpenChannel2Message(OpenChannel2Payload payload, UpfrontShutdownScriptTlv? upfrontShutdownScriptTlv = null, C
 1627        : base(MessageTypes.OPEN_CHANNEL_2, payload)
 28    {
 1629        UpfrontShutdownScriptTlv = upfrontShutdownScriptTlv;
 1630        ChannelTypeTlv = channelTypeTlv;
 1631        RequireConfirmedInputsTlv = requireConfirmedInputsTlv;
 32
 1633        if (UpfrontShutdownScriptTlv is not null || ChannelTypeTlv is not null || RequireConfirmedInputsTlv is not null)
 34        {
 835            Extension = new TlvStream();
 836            Extension.Add(UpfrontShutdownScriptTlv, ChannelTypeTlv, RequireConfirmedInputsTlv);
 37        }
 1638    }
 39}