< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Messages.AcceptChannel1Message
Assembly: NLightning.Domain
File(s): /home/runner/work/NLightning/NLightning/src/NLightning.Domain/Protocol/Messages/AcceptChannel1Message.cs
Tag: 57_24045730253
Line coverage
0%
Covered lines: 0
Uncovered lines: 14
Coverable lines: 14
Total lines: 42
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(...)100%210%
.ctor(...)0%2040%

File(s)

/home/runner/work/NLightning/NLightning/src/NLightning.Domain/Protocol/Messages/AcceptChannel1Message.cs

#LineLine coverage
 1namespace NLightning.Domain.Protocol.Messages;
 2
 3using Constants;
 4using Models;
 5using Payloads;
 6using Tlv;
 7
 8/// <summary>
 9/// Represents an open_channel message.
 10/// </summary>
 11/// <remarks>
 12/// The accept_channel message is sent to the initiator to accept the channel opening.
 13/// The message type is 33.
 14/// </remarks>
 15public sealed class AcceptChannel1Message : BaseChannelMessage
 16{
 17    /// <summary>
 18    /// The payload of the message.
 19    /// </summary>
 020    public new AcceptChannel1Payload Payload { get => (AcceptChannel1Payload)base.Payload; }
 21
 22    /// <summary>
 23    /// Optional UpfrontShutdownScriptTlv
 24    /// </summary>
 025    public UpfrontShutdownScriptTlv? UpfrontShutdownScriptTlv { get; }
 26
 27    /// <summary>
 28    /// Optional ChannelTypeTlv
 29    /// </summary>
 030    public ChannelTypeTlv? ChannelTypeTlv { get; }
 31
 32    public AcceptChannel1Message(AcceptChannel1Payload payload, ChannelTypeTlv channelTypeTlv,
 33                                 UpfrontShutdownScriptTlv? upfrontShutdownScriptTlv = null)
 034        : base(MessageTypes.AcceptChannel, payload)
 035    {
 036        UpfrontShutdownScriptTlv = upfrontShutdownScriptTlv;
 037        ChannelTypeTlv = channelTypeTlv;
 038
 039        Extension = new TlvStream();
 040        Extension.Add(UpfrontShutdownScriptTlv, ChannelTypeTlv);
 041    }
 042}