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

lightningnetwork / lnd / 18908318090

29 Oct 2025 12:45PM UTC coverage: 66.185%. First build
18908318090

Pull #9489

github

web-flow
Merge bb65b4fde into 1ccb52620
Pull Request #9489: multi: add BuildOnion, SendOnion, and TrackOnion RPCs

484 of 629 new or added lines in 14 files covered. (76.95%)

138000 of 208508 relevant lines covered (66.18%)

21020.57 hits per line

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

0.0
/lntest/rpc/switch.go
1
package rpc
2

3
import (
4
        "context"
5

6
        "github.com/lightningnetwork/lnd/lnrpc/switchrpc"
7
)
8

9
// =====================
10
// SwitchClient related RPCs.
11
// =====================
12

13
// SendOnion makes a RPC call to SendOnion and asserts.
14
//
15
//nolint:lll
16
func (h *HarnessRPC) SendOnion(
NEW
17
        req *switchrpc.SendOnionRequest) *switchrpc.SendOnionResponse {
×
NEW
18

×
NEW
19
        ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
×
NEW
20
        defer cancel()
×
NEW
21

×
NEW
22
        resp, err := h.Switch.SendOnion(ctxt, req)
×
NEW
23
        h.NoError(err, "SendOnion")
×
NEW
24

×
NEW
25
        return resp
×
NEW
26
}
×
27

28
// TrackOnion makes a RPC call to TrackOnion and asserts.
29
//
30
//nolint:lll
31
func (h *HarnessRPC) TrackOnion(
NEW
32
        req *switchrpc.TrackOnionRequest) *switchrpc.TrackOnionResponse {
×
NEW
33

×
NEW
34
        ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
×
NEW
35
        defer cancel()
×
NEW
36

×
NEW
37
        resp, err := h.Switch.TrackOnion(ctxt, req)
×
NEW
38
        h.NoError(err, "TrackOnion")
×
NEW
39

×
NEW
40
        return resp
×
NEW
41
}
×
42

43
// BuildOnion makes a RPC call to BuildOnion and asserts.
44
//
45
//nolint:lll
46
func (h *HarnessRPC) BuildOnion(
NEW
47
        req *switchrpc.BuildOnionRequest) *switchrpc.BuildOnionResponse {
×
NEW
48

×
NEW
49
        ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
×
NEW
50
        defer cancel()
×
NEW
51

×
NEW
52
        resp, err := h.Switch.BuildOnion(ctxt, req)
×
NEW
53
        h.NoError(err, "BuildOnion")
×
NEW
54

×
NEW
55
        return resp
×
NEW
56
}
×
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