< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Tlv.UpfrontShutdownScriptTlv
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Tlv/UpfrontShutdownScriptTlv.cs
Tag: 36_15743069263
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 27
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
get_ShutdownScriptPubkey()100%11100%
.ctor(...)100%11100%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Tlv/UpfrontShutdownScriptTlv.cs

#LineLine coverage
 1namespace NLightning.Domain.Protocol.Tlv;
 2
 3using Bitcoin.ValueObjects;
 4using Constants;
 5
 6/// <summary>
 7/// Upfront Shutdown Script TLV.
 8/// </summary>
 9/// <remarks>
 10/// The upfront shutdown script TLV is used in the AcceptChannel2Message to communicate the script to be used when the
 11/// channel is being closed.
 12/// </remarks>
 13public class UpfrontShutdownScriptTlv : BaseTlv
 14{
 15    /// <summary>
 16    /// The shutdown script to be used when closing the channel
 17    /// </summary>
 1218    public BitcoinScript ShutdownScriptPubkey { get; }
 19
 3620    public UpfrontShutdownScriptTlv(BitcoinScript shutdownScriptPubkey) : base(TlvConstants.UpfrontShutdownScript)
 21    {
 3622        ShutdownScriptPubkey = shutdownScriptPubkey;
 23
 3624        Value = shutdownScriptPubkey;
 3625        Length = Value.Length;
 3626    }
 27}