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

lightningnetwork / lnd / 12343072627

15 Dec 2024 11:09PM UTC coverage: 57.504% (-1.1%) from 58.636%
12343072627

Pull #9315

github

yyforyongyu
contractcourt: offer outgoing htlc one block earlier before its expiry

We need to offer the outgoing htlc one block earlier to make sure when
the expiry height hits, the sweeper will not miss sweeping it in the
same block. This also means the outgoing contest resolver now only does
one thing - watch for preimage spend till height expiry-1, which can
easily be moved into the timeout resolver instead in the future.
Pull Request #9315: Implement `blockbeat`

1445 of 2007 new or added lines in 26 files covered. (72.0%)

19246 existing lines in 249 files now uncovered.

102342 of 177975 relevant lines covered (57.5%)

24772.24 hits per line

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

75.0
/routing/nodepair.go
1
package routing
2

3
import (
4
        "fmt"
5

6
        "github.com/lightningnetwork/lnd/routing/route"
7
)
8

9
// DirectedNodePair stores a directed pair of nodes.
10
type DirectedNodePair struct {
11
        From, To route.Vertex
12
}
13

14
// NewDirectedNodePair instantiates a new DirectedNodePair struct.
15
func NewDirectedNodePair(from, to route.Vertex) DirectedNodePair {
291✔
16
        return DirectedNodePair{
291✔
17
                From: from,
291✔
18
                To:   to,
291✔
19
        }
291✔
20
}
291✔
21

22
// String converts a node pair to its human readable representation.
UNCOV
23
func (d DirectedNodePair) String() string {
×
UNCOV
24
        return fmt.Sprintf("%v -> %v", d.From, d.To)
×
UNCOV
25
}
×
26

27
// Reverse returns a reversed copy of the pair.
28
func (d DirectedNodePair) Reverse() DirectedNodePair {
53✔
29
        return DirectedNodePair{From: d.To, To: d.From}
53✔
30
}
53✔
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