< Summary - Combined Code Coverage

Information
Class: NLightning.Infrastructure.Persistence.Entities.Channel.ChannelKeySetEntity
Assembly: NLightning.Infrastructure.Persistence
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Infrastructure.Persistence/Entities/Channel/ChannelKeySetEntity.cs
Tag: 36_15743069263
Line coverage
0%
Covered lines: 0
Uncovered lines: 13
Coverable lines: 13
Total lines: 83
Line coverage: 0%
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_ChannelId()100%210%
get_IsLocal()100%210%
get_FundingPubKey()100%210%
get_RevocationBasepoint()100%210%
get_PaymentBasepoint()100%210%
get_DelayedPaymentBasepoint()100%210%
get_HtlcBasepoint()100%210%
get_CurrentPerCommitmentIndex()100%210%
get_CurrentPerCommitmentPoint()100%210%
get_LastRevealedPerCommitmentSecret()100%210%
get_KeyIndex()100%210%
.ctor()100%210%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Infrastructure.Persistence/Entities/Channel/ChannelKeySetEntity.cs

#LineLine coverage
 1// ReSharper disable PropertyCanBeMadeInitOnly.Global
 2
 3using NLightning.Domain.Channels.ValueObjects;
 4
 5namespace NLightning.Infrastructure.Persistence.Entities.Channel;
 6
 7/// <summary>
 8/// Represents a set of cryptographic keys associated with a Lightning Network channel.
 9/// </summary>
 10public class ChannelKeySetEntity
 11{
 12    /// <summary>
 13    /// The unique channel identifier this key set belongs to.
 14    /// </summary>
 15    /// <remarks>Part of the composite primary key.</remarks>
 016    public required ChannelId ChannelId { get; set; }
 17
 18    /// <summary>
 19    /// Indicates whether this key set belongs to the local node or remote node.
 20    /// </summary>
 21    /// <remarks>Part of the composite primary key.</remarks>
 022    public bool IsLocal { get; set; }
 23
 24    /// <summary>
 25    /// The funding public key used to create the multisig funding output.
 26    /// </summary>
 027    public required byte[] FundingPubKey { get; set; }
 28
 29    /// <summary>
 30    /// The base point for generating revocation keys.
 31    /// </summary>
 032    public required byte[] RevocationBasepoint { get; set; }
 33
 34    /// <summary>
 35    /// The base point for generating payment keys.
 36    /// </summary>
 037    public required byte[] PaymentBasepoint { get; set; }
 38
 39    /// <summary>
 40    /// The base point for generating delayed payment keys.
 41    /// </summary>
 042    public required byte[] DelayedPaymentBasepoint { get; set; }
 43
 44    /// <summary>
 45    /// The base point for generating HTLC keys.
 46    /// </summary>
 047    public required byte[] HtlcBasepoint { get; set; }
 48
 49    /// <summary>
 50    /// The current per-commitment index used in a channel's key set.
 51    /// </summary>
 52    /// <remarks>
 53    /// This index tracks the state of the commitment transaction sequence
 54    /// in the channel. It is incremented with each new commitment point.
 55    /// </remarks>
 056    public required ulong CurrentPerCommitmentIndex { get; set; }
 57
 58    /// <summary>
 59    /// The current per-commitment point being used for the active commitment transaction.
 60    /// </summary>
 061    public required byte[] CurrentPerCommitmentPoint { get; set; }
 62
 63    /// <summary>
 64    /// For remote key sets: stores their last revealed per-commitment secret
 65    /// This is needed to create penalty transactions if they broadcast old commitments
 66    /// For local key sets: this should be null (we don't store our own secrets)
 67    /// </summary>
 68
 069    public byte[]? LastRevealedPerCommitmentSecret { get; set; }
 70
 71    /// <summary>
 72    /// The index representing the key derivation progress for this channel key set.
 73    /// </summary>
 74    /// <remarks>Used to track the current state of key generation in the channel.</remarks>
 075    public required uint KeyIndex { get; set; }
 76
 77    /// <summary>
 78    /// Default constructor for EF Core.
 79    /// </summary>
 080    internal ChannelKeySetEntity()
 81    {
 082    }
 83}