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

lightningnetwork / lnd / 13481548301

23 Feb 2025 09:06AM UTC coverage: 4.031% (-54.8%) from 58.825%
13481548301

Pull #9521

github

web-flow
Merge 1ffbe99fe into 5fe900d18
Pull Request #9521: unit: remove GOACC, use Go 1.20 native coverage functionality

2852 of 70750 relevant lines covered (4.03%)

0.92 hits per line

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

0.0
/graph/db/codec.go
1
package graphdb
2

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

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

10
var (
11
        // byteOrder defines the preferred byte order, which is Big Endian.
12
        byteOrder = binary.BigEndian
13
)
14

15
// WriteOutpoint writes an outpoint to the passed writer using the minimal
16
// amount of bytes possible.
17
func WriteOutpoint(w io.Writer, o *wire.OutPoint) error {
×
18
        if _, err := w.Write(o.Hash[:]); err != nil {
×
19
                return err
×
20
        }
×
21
        if err := binary.Write(w, byteOrder, o.Index); err != nil {
×
22
                return err
×
23
        }
×
24

25
        return nil
×
26
}
27

28
// ReadOutpoint reads an outpoint from the passed reader that was previously
29
// written using the WriteOutpoint struct.
30
func ReadOutpoint(r io.Reader, o *wire.OutPoint) error {
×
31
        if _, err := io.ReadFull(r, o.Hash[:]); err != nil {
×
32
                return err
×
33
        }
×
34
        if err := binary.Read(r, byteOrder, &o.Index); err != nil {
×
35
                return err
×
36
        }
×
37

38
        return nil
×
39
}
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

© 2026 Coveralls, Inc