< Summary - Combined Code Coverage

Information
Class: NLightning.Infrastructure.Bitcoin.Transactions.HtlcTimeoutTransaction
Assembly: NLightning.Infrastructure.Bitcoin
File(s): /home/runner/work/nlightning/nlightning/src/NLightning.Infrastructure.Bitcoin/Transactions/HtlcTimeoutTransaction.cs
Tag: 30_15166811759
Line coverage
0%
Covered lines: 0
Uncovered lines: 11
Coverable lines: 11
Total lines: 28
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
.ctor(...)100%210%
SignTransaction(...)100%210%

File(s)

/home/runner/work/nlightning/nlightning/src/NLightning.Infrastructure.Bitcoin/Transactions/HtlcTimeoutTransaction.cs

#LineLine coverage
 1using NBitcoin;
 2
 3namespace NLightning.Infrastructure.Bitcoin.Transactions;
 4
 5using Outputs;
 6
 7public class HtlcTimeoutTransaction : BaseHtlcTransaction
 8{
 9    public HtlcTimeoutTransaction(bool hasAnchorOutputs, Network network, BaseHtlcOutput output,
 10                                   PubKey revocationPubKey, PubKey localDelayedPubKey, uint cltvEpiry,
 11                                   ulong toSelfDelay, ulong amountMilliSats)
 012        : base(hasAnchorOutputs, network, output, revocationPubKey, localDelayedPubKey, toSelfDelay, amountMilliSats)
 13    {
 014        SetLockTime(cltvEpiry);
 015    }
 16
 17    protected new void SignTransaction(params BitcoinSecret[] secrets)
 18    {
 019        var witness = new WitScript(
 020            Op.GetPushOp(0), // OP_0
 021            Op.GetPushOp(0), // Remote signature
 022            Op.GetPushOp(0), // Local signature
 023            Op.GetPushOp([]) // Payment pre-image for HTLC-success
 024        );
 25
 026        base.SignTransaction(secrets);
 027    }
 28}