< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Payloads.ChannelReestablishPayload
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Payloads/ChannelReestablishPayload.cs
Tag: 30_15166811759
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 43
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_NextCommitmentNumber()100%11100%
get_NextRevocationNumber()100%11100%
get_YourLastPerCommitmentSecret()100%11100%
get_MyCurrentPerCommitmentPoint()100%11100%

File(s)

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

#LineLine coverage
 1using NBitcoin;
 2
 3namespace NLightning.Domain.Protocol.Payloads;
 4
 5using Interfaces;
 6using ValueObjects;
 7
 8/// <summary>
 9/// Represents the payload for the channel_reestablish message.
 10/// </summary>
 11/// <remarks>
 12/// Initializes a new instance of the ChannelReestablishPayload class.
 13/// </remarks>
 14/// <param name="channelId">The channel ID.</param>
 2015public class ChannelReestablishPayload(ChannelId channelId, PubKey myCurrentPerCommitmentPoint,
 2016                                       ulong nextCommitmentNumber, ulong nextRevocationNumber,
 2017                                       ReadOnlyMemory<byte> yourLastPerCommitmentSecret) : IMessagePayload
 18{
 19    /// <summary>
 20    /// Gets the channel ID.
 21    /// </summary>
 3622    public ChannelId ChannelId { get; } = channelId;
 23
 24    /// <summary>
 25    /// The commitment transaction counter
 26    /// </summary>
 3627    public ulong NextCommitmentNumber { get; } = nextCommitmentNumber;
 28
 29    /// <summary>
 30    /// The commitment counter it expects for the next revoke and ack message
 31    /// </summary>
 3632    public ulong NextRevocationNumber { get; } = nextRevocationNumber;
 33
 34    /// <summary>
 35    /// The last per commitment secret received
 36    /// </summary>
 3637    public ReadOnlyMemory<byte> YourLastPerCommitmentSecret { get; } = yourLastPerCommitmentSecret;
 38
 39    /// <summary>
 40    /// The current per commitment point
 41    /// </summary>
 3642    public PubKey MyCurrentPerCommitmentPoint { get; } = myCurrentPerCommitmentPoint;
 43}