< Summary - Combined Code Coverage

Information
Class: NLightning.Domain.Protocol.Payloads.UpdateFailMalformedHtlcPayload
Assembly: NLightning.Domain
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Domain/Protocol/Payloads/UpdateFailMalformedHtlcPayload.cs
Tag: 30_15166811759
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 37
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_Id()100%11100%
get_Sha256OfOnion()100%11100%
get_FailureCode()100%11100%

File(s)

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

#LineLine coverage
 1namespace NLightning.Domain.Protocol.Payloads;
 2
 3using Interfaces;
 4using ValueObjects;
 5
 6/// <summary>
 7/// Represents the payload for the update_fail_malformed_htlc message.
 8/// </summary>
 9/// <remarks>
 10/// Initializes a new instance of the UpdateFailMalformedHtlcPayload class.
 11/// </remarks>
 812public class UpdateFailMalformedHtlcPayload(ChannelId channelId, ushort failureCode, ulong id,
 813                                            ReadOnlyMemory<byte> sha256OfOnion) : IMessagePayload
 14{
 15    /// <summary>
 16    /// The channel_id this message refers to
 17    /// </summary>
 1618    public ChannelId ChannelId { get; } = channelId;
 19
 20    /// <summary>
 21    /// The htlc id
 22    /// </summary>
 1623    public ulong Id { get; } = id;
 24
 25    /// <summary>
 26    /// The sha256 of onion if an onion was received
 27    /// </summary>
 28    /// <remarks>
 29    /// May use an all zero array
 30    /// </remarks>
 1631    public ReadOnlyMemory<byte> Sha256OfOnion { get; } = sha256OfOnion;
 32
 33    /// <summary>
 34    /// The failure code
 35    /// </summary>
 836    public ushort FailureCode => failureCode;
 37}