< 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: 36_15743069263
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 45
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
 1namespace NLightning.Domain.Protocol.Payloads;
 2
 3using Channels.ValueObjects;
 4using Crypto.ValueObjects;
 5using Interfaces;
 6
 7/// <summary>
 8/// Represents the payload for the channel_reestablish message.
 9/// </summary>
 10/// <remarks>
 11/// Initializes a new instance of the ChannelReestablishPayload class.
 12/// </remarks>
 13/// <param name="channelId">The channel ID.</param>
 2014public class ChannelReestablishPayload(
 2015    ChannelId channelId,
 2016    CompactPubKey myCurrentPerCommitmentPoint,
 2017    ulong nextCommitmentNumber,
 2018    ulong nextRevocationNumber,
 2019    ReadOnlyMemory<byte> yourLastPerCommitmentSecret) : IChannelMessagePayload
 20{
 21    /// <summary>
 22    /// Gets the channel ID.
 23    /// </summary>
 3624    public ChannelId ChannelId { get; } = channelId;
 25
 26    /// <summary>
 27    /// The commitment transaction counter
 28    /// </summary>
 3629    public ulong NextCommitmentNumber { get; } = nextCommitmentNumber;
 30
 31    /// <summary>
 32    /// The commitment counter it expects for the next revoke and ack message
 33    /// </summary>
 3634    public ulong NextRevocationNumber { get; } = nextRevocationNumber;
 35
 36    /// <summary>
 37    /// The last per commitment secret received
 38    /// </summary>
 3639    public ReadOnlyMemory<byte> YourLastPerCommitmentSecret { get; } = yourLastPerCommitmentSecret;
 40
 41    /// <summary>
 42    /// The current per commitment point
 43    /// </summary>
 3644    public CompactPubKey MyCurrentPerCommitmentPoint { get; } = myCurrentPerCommitmentPoint;
 45}