< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Bitcoin.Transactions.Outputs.ToLocalOutputInfo
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Bitcoin/Transactions/Outputs/ToLocalOutputInfo.cs
Tag: 36_15743069263
Line coverage
78%
Covered lines: 11
Uncovered lines: 3
Coverable lines: 14
Total lines: 61
Line coverage: 78.5%
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_Amount()100%11100%
get_OutputType()100%210%
get_RevocationPubKey()100%11100%
get_LocalDelayedPaymentPubKey()100%11100%
get_ToSelfDelay()100%11100%
get_TransactionId()100%210%
get_Index()100%210%
.ctor(...)100%11100%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Domain/Bitcoin/Transactions/Outputs/ToLocalOutputInfo.cs

#LineLine coverage
 1using NLightning.Domain.Bitcoin.Transactions.Enums;
 2using NLightning.Domain.Bitcoin.Transactions.Interfaces;
 3using NLightning.Domain.Bitcoin.ValueObjects;
 4using NLightning.Domain.Crypto.ValueObjects;
 5using NLightning.Domain.Money;
 6
 7namespace NLightning.Domain.Bitcoin.Transactions.Outputs;
 8
 9/// <summary>
 10/// Represents the information needed to construct a to_local output in a commitment transaction.
 11/// This follows the BOLT #3 specification for to_local outputs.
 12/// </summary>
 13public class ToLocalOutputInfo : IOutputInfo
 14{
 15    /// <summary>
 16    /// Gets the amount of the output.
 17    /// </summary>
 6418    public LightningMoney Amount { get; }
 19
 20    /// <summary>
 21    /// Gets the type of the output.
 22    /// </summary>
 023    public OutputType OutputType => OutputType.ToLocal;
 24
 25    /// <summary>
 26    /// Gets the remote's revocation public key.
 27    /// </summary>
 6028    public CompactPubKey RevocationPubKey { get; }
 29
 30    /// <summary>
 31    /// Gets the local's delayed payment public key.
 32    /// </summary>
 6033    public CompactPubKey LocalDelayedPaymentPubKey { get; }
 34
 35    /// <summary>
 36    /// Gets the CSV delay for the to_local output.
 37    /// </summary>
 6038    public ushort ToSelfDelay { get; }
 39
 40    /// <summary>
 41    /// Gets or sets the transaction ID of the output once it's created.
 42    /// </summary>
 043    public TxId? TransactionId { get; set; }
 44
 45    /// <summary>
 46    /// Gets or sets the index of the output in the transaction once it's created.
 47    /// </summary>
 048    public ushort? Index { get; set; }
 49
 50    /// <summary>
 51    /// Creates a new instance of ToLocalOutputInfo.
 52    /// </summary>
 6453    public ToLocalOutputInfo(LightningMoney amount, CompactPubKey localDelayedPaymentPubKey,
 6454                             CompactPubKey revocationPubKey, ushort toSelfDelay)
 55    {
 6456        Amount = amount;
 6457        RevocationPubKey = revocationPubKey;
 6458        LocalDelayedPaymentPubKey = localDelayedPaymentPubKey;
 6459        ToSelfDelay = toSelfDelay;
 6460    }
 61}