< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Messages.OpenChannel1Message
Assembly: NLightning.Domain
File(s): /home/runner/work/NLightning/NLightning/src/NLightning.Domain/Protocol/Messages/OpenChannel1Message.cs
Tag: 57_24045730253
Line coverage
0%
Covered lines: 0
Uncovered lines: 11
Coverable lines: 11
Total lines: 35
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Payload()100%210%
get_UpfrontShutdownScriptTlv()100%210%
get_ChannelTypeTlv()100%210%
.ctor(...)0%2040%
.ctor(...)100%210%

File(s)

/home/runner/work/NLightning/NLightning/src/NLightning.Domain/Protocol/Messages/OpenChannel1Message.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_channel message is sent to another peer in order to start the channel negotiation.
 13/// The message type is 32.
 14/// </remarks>
 15public sealed class OpenChannel1Message : BaseChannelMessage
 16{
 17    /// <summary>
 18    /// The payload of the message.
 19    /// </summary>
 020    public new OpenChannel1Payload Payload { get => (OpenChannel1Payload)base.Payload; }
 21
 022    public UpfrontShutdownScriptTlv? UpfrontShutdownScriptTlv { get; }
 023    public ChannelTypeTlv ChannelTypeTlv { get; }
 24
 25    public OpenChannel1Message(OpenChannel1Payload payload, ChannelTypeTlv channelTypeTlv,
 26                               UpfrontShutdownScriptTlv? upfrontShutdownScriptTlv = null)
 027        : base(MessageTypes.OpenChannel, payload)
 28    {
 029        UpfrontShutdownScriptTlv = upfrontShutdownScriptTlv;
 030        ChannelTypeTlv = channelTypeTlv;
 31
 032        Extension = new TlvStream();
 033        Extension.Add(UpfrontShutdownScriptTlv, ChannelTypeTlv);
 034    }
 035}