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

lightningnetwork / lnd / 12046444022

27 Nov 2024 08:27AM UTC coverage: 48.895% (-10.1%) from 58.999%
12046444022

push

github

web-flow
Merge pull request #8270 from ProofOfKeags/feature/stfu

DynComms [1/n]: Implement Quiescence Protocol

276 of 640 new or added lines in 16 files covered. (43.13%)

27341 existing lines in 437 files now uncovered.

98286 of 201015 relevant lines covered (48.89%)

1.04 hits per line

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

0.0
/lnrpc/devrpc/dev.pb.json.go
1
// Code generated by falafel 0.9.2. DO NOT EDIT.
2
// source: dev.proto
3

4
package devrpc
5

6
import (
7
        "context"
8

9
        gateway "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
10
        "github.com/lightningnetwork/lnd/lnrpc"
11
        "google.golang.org/grpc"
12
        "google.golang.org/protobuf/encoding/protojson"
13
)
14

15
func RegisterDevJSONCallbacks(registry map[string]func(ctx context.Context,
16
        conn *grpc.ClientConn, reqJSON string, callback func(string, error))) {
×
17

×
18
        marshaler := &gateway.JSONPb{
×
19
                MarshalOptions: protojson.MarshalOptions{
×
20
                        UseProtoNames:   true,
×
21
                        EmitUnpopulated: true,
×
22
                },
×
23
        }
×
24

×
25
        registry["devrpc.Dev.ImportGraph"] = func(ctx context.Context,
×
26
                conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
×
27

×
28
                req := &lnrpc.ChannelGraph{}
×
29
                err := marshaler.Unmarshal([]byte(reqJSON), req)
×
30
                if err != nil {
×
31
                        callback("", err)
×
32
                        return
×
33
                }
×
34

35
                client := NewDevClient(conn)
×
36
                resp, err := client.ImportGraph(ctx, req)
×
37
                if err != nil {
×
38
                        callback("", err)
×
39
                        return
×
40
                }
×
41

42
                respBytes, err := marshaler.Marshal(resp)
×
43
                if err != nil {
×
44
                        callback("", err)
×
45
                        return
×
46
                }
×
47
                callback(string(respBytes), nil)
×
48
        }
49

NEW
50
        registry["devrpc.Dev.Quiesce"] = func(ctx context.Context,
×
NEW
51
                conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
×
NEW
52

×
NEW
53
                req := &QuiescenceRequest{}
×
NEW
54
                err := marshaler.Unmarshal([]byte(reqJSON), req)
×
NEW
55
                if err != nil {
×
NEW
56
                        callback("", err)
×
NEW
57
                        return
×
NEW
58
                }
×
59

NEW
60
                client := NewDevClient(conn)
×
NEW
61
                resp, err := client.Quiesce(ctx, req)
×
NEW
62
                if err != nil {
×
NEW
63
                        callback("", err)
×
NEW
64
                        return
×
NEW
65
                }
×
66

NEW
67
                respBytes, err := marshaler.Marshal(resp)
×
NEW
68
                if err != nil {
×
NEW
69
                        callback("", err)
×
NEW
70
                        return
×
NEW
71
                }
×
NEW
72
                callback(string(respBytes), nil)
×
73
        }
74
}
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