• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 16918135633

12 Aug 2025 06:56PM UTC coverage: 56.955% (-9.9%) from 66.9%
16918135633

push

github

web-flow
Merge pull request #9871 from GeorgeTsagk/htlc-noop-add

Add `NoopAdd` HTLCs

48 of 147 new or added lines in 3 files covered. (32.65%)

29154 existing lines in 462 files now uncovered.

98265 of 172532 relevant lines covered (56.95%)

1.19 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

72.41
/input/txout.go
1
package input
2

3
import (
4
        "encoding/binary"
5
        "io"
6

7
        "github.com/btcsuite/btcd/wire"
8
)
9

10
// writeTxOut serializes a wire.TxOut struct into the passed io.Writer stream.
11
func writeTxOut(w io.Writer, txo *wire.TxOut) error {
2✔
12
        var scratch [8]byte
2✔
13

2✔
14
        binary.BigEndian.PutUint64(scratch[:], uint64(txo.Value))
2✔
15
        if _, err := w.Write(scratch[:]); err != nil {
2✔
16
                return err
×
17
        }
×
18

19
        if err := wire.WriteVarBytes(w, 0, txo.PkScript); err != nil {
2✔
20
                return err
×
21
        }
×
22

23
        return nil
2✔
24
}
25

26
// readTxOut deserializes a wire.TxOut struct from the passed io.Reader stream.
27
func readTxOut(r io.Reader, txo *wire.TxOut) error {
2✔
28
        var scratch [8]byte
2✔
29

2✔
30
        if _, err := io.ReadFull(r, scratch[:]); err != nil {
2✔
31
                return err
×
32
        }
×
33
        value := int64(binary.BigEndian.Uint64(scratch[:]))
2✔
34

2✔
35
        pkScript, err := wire.ReadVarBytes(r, 0, 80, "pkScript")
2✔
36
        if err != nil {
2✔
UNCOV
37
                return err
×
UNCOV
38
        }
×
39

40
        *txo = wire.TxOut{
2✔
41
                Value:    value,
2✔
42
                PkScript: pkScript,
2✔
43
        }
2✔
44

2✔
45
        return nil
2✔
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc