< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Payloads.ShutdownPayload
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Payloads/ShutdownPayload.cs
Tag: 36_15743069263
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 29
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_ScriptPubkeyLen()100%11100%
get_ScriptPubkey()100%11100%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Payloads/ShutdownPayload.cs

#LineLine coverage
 1namespace NLightning.Domain.Protocol.Payloads;
 2
 3using Bitcoin.ValueObjects;
 4using Channels.ValueObjects;
 5using Interfaces;
 6
 7/// <summary>
 8/// Represents the payload for the shutdown message.
 9/// </summary>
 10/// <remarks>
 11/// Initializes a new instance of the ShutdownPayload class.
 12/// </remarks>
 813public class ShutdownPayload(ChannelId channelId, BitcoinScript scriptPubkey) : IChannelMessagePayload
 14{
 15    /// <summary>
 16    /// The channel_id this message refers to
 17    /// </summary>
 1618    public ChannelId ChannelId { get; } = channelId;
 19
 20    /// <summary>
 21    /// len is the scriptpubkey length
 22    /// </summary>
 1623    public ushort ScriptPubkeyLen { get; } = (ushort)scriptPubkey.Length;
 24
 25    /// <summary>
 26    /// The scriptpubkey to send the closing funds to
 27    /// </summary>
 1628    public BitcoinScript ScriptPubkey { get; } = scriptPubkey;
 29}