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

lightningnetwork / lnd / 15880798456

25 Jun 2025 03:38PM UTC coverage: 57.8% (+0.5%) from 57.316%
15880798456

Pull #9972

github

web-flow
Merge c9776fe87 into fb1fef9e6
Pull Request #9972: [17] multi: run all graph unit tests against SQL backends & run itest suite against SQL graph backend

10 of 45 new or added lines in 5 files covered. (22.22%)

66 existing lines in 11 files now uncovered.

98368 of 170187 relevant lines covered (57.8%)

1.79 hits per line

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

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

3
import (
4
        "errors"
5
        "fmt"
6
)
7

8
var (
9
        // ErrEdgePolicyOptionalFieldNotFound is an error returned if a channel
10
        // policy field is not found in the db even though its message flags
11
        // indicate it should be.
12
        ErrEdgePolicyOptionalFieldNotFound = fmt.Errorf("optional field not " +
13
                "present")
14

15
        // ErrParsingExtraTLVBytes is returned when we attempt to parse
16
        // extra opaque bytes as a TLV stream, but the parsing fails.
17
        ErrParsingExtraTLVBytes = fmt.Errorf("error parsing extra TLV bytes")
18

19
        // ErrGraphNotFound is returned when at least one of the components of
20
        // graph doesn't exist.
21
        ErrGraphNotFound = fmt.Errorf("graph bucket not initialized")
22

23
        // ErrGraphNeverPruned is returned when graph was never pruned.
24
        ErrGraphNeverPruned = fmt.Errorf("graph never pruned")
25

26
        // ErrSourceNodeNotSet is returned if the source node of the graph
27
        // hasn't been added The source node is the center node within a
28
        // star-graph.
29
        ErrSourceNodeNotSet = fmt.Errorf("source node does not exist")
30

31
        // ErrGraphNodesNotFound is returned in case none of the nodes has
32
        // been added in graph node bucket.
33
        ErrGraphNodesNotFound = fmt.Errorf("no graph nodes exist")
34

35
        // ErrGraphNoEdgesFound is returned in case of none of the channel/edges
36
        // has been added in graph edge bucket.
37
        ErrGraphNoEdgesFound = fmt.Errorf("no graph edges exist")
38

39
        // ErrGraphNodeNotFound is returned when we're unable to find the target
40
        // node.
41
        ErrGraphNodeNotFound = fmt.Errorf("unable to find node")
42

43
        // ErrZombieEdge is an error returned when we attempt to look up an edge
44
        // but it is marked as a zombie within the zombie index.
45
        ErrZombieEdge = errors.New("edge marked as zombie")
46

47
        // ErrEdgeNotFound is returned when an edge for the target chanID
48
        // can't be found.
49
        ErrEdgeNotFound = fmt.Errorf("edge not found")
50

51
        // ErrEdgeAlreadyExist is returned when edge with specific
52
        // channel id can't be added because it already exist.
53
        ErrEdgeAlreadyExist = fmt.Errorf("edge already exist")
54

55
        // ErrNodeAliasNotFound is returned when alias for node can't be found.
56
        ErrNodeAliasNotFound = fmt.Errorf("alias for node not found")
57

58
        // ErrClosedScidsNotFound is returned when the closed scid bucket
59
        // hasn't been created.
60
        ErrClosedScidsNotFound = fmt.Errorf("closed scid bucket doesn't exist")
61

62
        // ErrZombieEdgeNotFound is an error returned when we attempt to find an
63
        // edge in the zombie index which is not there.
64
        ErrZombieEdgeNotFound = errors.New("edge not found in zombie index")
65

66
        // ErrUnknownAddressType is returned when a node's addressType is not
67
        // an expected value.
68
        ErrUnknownAddressType = fmt.Errorf("address type cannot be resolved")
69
)
70

71
// ErrTooManyExtraOpaqueBytes creates an error which should be returned if the
72
// caller attempts to write an announcement message which bares too many extra
73
// opaque bytes. We limit this value in order to ensure that we don't waste
74
// disk space due to nodes unnecessarily padding out their announcements with
75
// garbage data.
UNCOV
76
func ErrTooManyExtraOpaqueBytes(numBytes int) error {
×
UNCOV
77
        return fmt.Errorf("max allowed number of opaque bytes is %v, received "+
×
UNCOV
78
                "%v bytes", MaxAllowedExtraOpaqueBytes, numBytes)
×
UNCOV
79
}
×
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