< 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: 30_15166811759
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 28
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
 1using NBitcoin;
 2
 3namespace NLightning.Domain.Protocol.Tlv;
 4
 5using Constants;
 6
 7/// <summary>
 8/// Upfront Shutdown Script TLV.
 9/// </summary>
 10/// <remarks>
 11/// The upfront shutdown script TLV is used in the AcceptChannel2Message to communicate the script to be used when the
 12/// channel is being closed.
 13/// </remarks>
 14public class UpfrontShutdownScriptTlv : BaseTlv
 15{
 16    /// <summary>
 17    /// The shutdown script to be used when closing the channel
 18    /// </summary>
 1219    public Script ShutdownScriptPubkey { get; }
 20
 3221    public UpfrontShutdownScriptTlv(Script shutdownScriptPubkey) : base(TlvConstants.UPFRONT_SHUTDOWN_SCRIPT)
 22    {
 3223        ShutdownScriptPubkey = shutdownScriptPubkey;
 24
 3225        Value = shutdownScriptPubkey.ToBytes();
 3226        Length = Value.Length;
 3227    }
 28}