< Summary - Combined Code Coverage

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

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_ChannelId()100%11100%
get_TxId()100%11100%
get_Witnesses()100%11100%
.ctor(...)50%22100%

File(s)

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

#LineLine coverage
 1namespace NLightning.Domain.Protocol.Payloads;
 2
 3using Bitcoin.ValueObjects;
 4using Channels.ValueObjects;
 5using Interfaces;
 6using Messages;
 7
 8/// <summary>
 9/// Represents a tx_signatures payload.
 10/// </summary>
 11/// <remarks>
 12/// The tx_signatures payload signals the provision of transaction signatures.
 13/// </remarks>
 14/// <seealso cref="TxSignaturesMessage"/>
 15/// <seealso cref="Channels.ValueObjects.ChannelId"/>
 16/// <seealso cref="Witness"/>
 17public class TxSignaturesPayload : IChannelMessagePayload
 18{
 19    /// <summary>
 20    /// The channel id.
 21    /// </summary>
 822    public ChannelId ChannelId { get; }
 23
 24    /// <summary>
 25    /// The transaction id.
 26    /// </summary>
 827    public byte[] TxId { get; }
 28
 29    /// <summary>
 30    /// The witnesses.
 31    /// </summary>
 1632    public List<Witness> Witnesses { get; }
 33
 34    /// <summary>
 35    /// Initializes a new instance of the <see cref="TxSignaturesPayload"/> class.
 36    /// </summary>
 37    /// <param name="channelId">The channel id.</param>
 38    /// <param name="txId">The transaction id.</param>
 39    /// <param name="witnesses">The witnesses.</param>
 40    /// <exception cref="ArgumentException">TxId must be 32 bytes</exception>
 1241    public TxSignaturesPayload(ChannelId channelId, byte[] txId, List<Witness> witnesses)
 42    {
 1243        if (txId.Length != 32)
 444            throw new ArgumentException("TxId must be 32 bytes", nameof(txId));
 45
 846        ChannelId = channelId;
 847        TxId = txId;
 848        Witnesses = witnesses;
 849    }
 50}