< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Bitcoin.Transactions.Outputs.AnchorOutputInfo
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Bitcoin/Transactions/Outputs/AnchorOutputInfo.cs
Tag: 36_15743069263
Line coverage
0%
Covered lines: 0
Uncovered lines: 10
Coverable lines: 10
Total lines: 50
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Amount()100%210%
get_OutputType()100%210%
get_FundingPubKey()100%210%
get_TransactionId()100%210%
get_Index()100%210%
.ctor(...)0%620%

File(s)

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

#LineLine coverage
 1using NLightning.Domain.Bitcoin.Transactions.Constants;
 2using NLightning.Domain.Bitcoin.Transactions.Enums;
 3using NLightning.Domain.Bitcoin.Transactions.Interfaces;
 4using NLightning.Domain.Bitcoin.ValueObjects;
 5using NLightning.Domain.Crypto.ValueObjects;
 6using NLightning.Domain.Money;
 7
 8namespace NLightning.Domain.Bitcoin.Transactions.Outputs;
 9
 10/// <summary>
 11/// Represents the information needed to construct an anchor output in a commitment transaction.
 12/// This follows the BOLT #3 specification for anchor outputs when option_anchors is negotiated.
 13/// </summary>
 14public class AnchorOutputInfo : IOutputInfo
 15{
 16    /// <summary>
 17    /// Gets the amount of the output.
 18    /// </summary>
 019    public LightningMoney Amount { get; }
 20
 21    /// <summary>
 22    /// Gets the type of the output.
 23    /// </summary>
 024    public OutputType OutputType { get; }
 25
 26    /// <summary>
 27    /// Gets the funding public key used for the anchor.
 28    /// </summary>
 029    public CompactPubKey FundingPubKey { get; }
 30
 31    /// <summary>
 32    /// Gets or sets the transaction ID of the output once it's created.
 33    /// </summary>
 034    public TxId? TransactionId { get; set; }
 35
 36    /// <summary>
 37    /// Gets or sets the index of the output in the transaction once it's created.
 38    /// </summary>
 039    public ushort? Index { get; set; }
 40
 41    /// <summary>
 42    /// Creates a new instance of AnchorOutputInfo.
 43    /// </summary>
 044    public AnchorOutputInfo(CompactPubKey fundingPubKey, bool isLocal)
 45    {
 046        Amount = TransactionConstants.AnchorOutputAmount;
 047        FundingPubKey = fundingPubKey;
 048        OutputType = isLocal ? OutputType.LocalAnchor : OutputType.RemoteAnchor;
 049    }
 50}