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

lightningnetwork / lnd / 12428593038

20 Dec 2024 09:02AM UTC coverage: 58.33% (-0.2%) from 58.576%
12428593038

Pull #9382

github

guggero
.golangci.yml: speed up linter by updating start commit

With this we allow the linter to only look at recent changes, since
everything between that old commit and this most recent one has been
linted correctly anyway.
Pull Request #9382: lint: deprecate old linters, use new ref commit

133769 of 229330 relevant lines covered (58.33%)

19284.53 hits per line

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

2.79
/lnrpc/neutrinorpc/neutrino_grpc.pb.go
1
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2

3
package neutrinorpc
4

5
import (
6
        context "context"
7
        grpc "google.golang.org/grpc"
8
        codes "google.golang.org/grpc/codes"
9
        status "google.golang.org/grpc/status"
10
)
11

12
// This is a compile-time assertion to ensure that this generated file
13
// is compatible with the grpc package it is being compiled against.
14
// Requires gRPC-Go v1.32.0 or later.
15
const _ = grpc.SupportPackageIsVersion7
16

17
// NeutrinoKitClient is the client API for NeutrinoKit service.
18
//
19
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
20
type NeutrinoKitClient interface {
21
        // lncli: `neutrino status`
22
        // Status returns the status of the light client neutrino instance,
23
        // along with height and hash of the best block, and a list of connected
24
        // peers.
25
        Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
26
        // lncli: `neutrino addpeer`
27
        // AddPeer adds a new peer that has already been connected to the server.
28
        AddPeer(ctx context.Context, in *AddPeerRequest, opts ...grpc.CallOption) (*AddPeerResponse, error)
29
        // lncli: `neutrino disconnectpeer`
30
        // DisconnectPeer disconnects a peer by target address. Both outbound and
31
        // inbound nodes will be searched for the target node. An error message will
32
        // be returned if the peer was not found.
33
        DisconnectPeer(ctx context.Context, in *DisconnectPeerRequest, opts ...grpc.CallOption) (*DisconnectPeerResponse, error)
34
        // lncli: `neutrino isbanned`
35
        // IsBanned returns true if the peer is banned, otherwise false.
36
        IsBanned(ctx context.Context, in *IsBannedRequest, opts ...grpc.CallOption) (*IsBannedResponse, error)
37
        // lncli: `neutrino getblockheader`
38
        // GetBlockHeader returns a block header with a particular block hash.
39
        GetBlockHeader(ctx context.Context, in *GetBlockHeaderRequest, opts ...grpc.CallOption) (*GetBlockHeaderResponse, error)
40
        // GetBlock returns a block with a particular block hash.
41
        GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error)
42
        // lncli: `neutrino getcfilter`
43
        // GetCFilter returns a compact filter from a block.
44
        GetCFilter(ctx context.Context, in *GetCFilterRequest, opts ...grpc.CallOption) (*GetCFilterResponse, error)
45
        // Deprecated: Do not use.
46
        //
47
        // Deprecated, use chainrpc.GetBlockHash instead.
48
        // GetBlockHash returns the header hash of a block at a given height.
49
        GetBlockHash(ctx context.Context, in *GetBlockHashRequest, opts ...grpc.CallOption) (*GetBlockHashResponse, error)
50
}
51

52
type neutrinoKitClient struct {
53
        cc grpc.ClientConnInterface
54
}
55

56
func NewNeutrinoKitClient(cc grpc.ClientConnInterface) NeutrinoKitClient {
1✔
57
        return &neutrinoKitClient{cc}
1✔
58
}
1✔
59

60
func (c *neutrinoKitClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) {
×
61
        out := new(StatusResponse)
×
62
        err := c.cc.Invoke(ctx, "/neutrinorpc.NeutrinoKit/Status", in, out, opts...)
×
63
        if err != nil {
×
64
                return nil, err
×
65
        }
×
66
        return out, nil
×
67
}
68

69
func (c *neutrinoKitClient) AddPeer(ctx context.Context, in *AddPeerRequest, opts ...grpc.CallOption) (*AddPeerResponse, error) {
×
70
        out := new(AddPeerResponse)
×
71
        err := c.cc.Invoke(ctx, "/neutrinorpc.NeutrinoKit/AddPeer", in, out, opts...)
×
72
        if err != nil {
×
73
                return nil, err
×
74
        }
×
75
        return out, nil
×
76
}
77

78
func (c *neutrinoKitClient) DisconnectPeer(ctx context.Context, in *DisconnectPeerRequest, opts ...grpc.CallOption) (*DisconnectPeerResponse, error) {
×
79
        out := new(DisconnectPeerResponse)
×
80
        err := c.cc.Invoke(ctx, "/neutrinorpc.NeutrinoKit/DisconnectPeer", in, out, opts...)
×
81
        if err != nil {
×
82
                return nil, err
×
83
        }
×
84
        return out, nil
×
85
}
86

87
func (c *neutrinoKitClient) IsBanned(ctx context.Context, in *IsBannedRequest, opts ...grpc.CallOption) (*IsBannedResponse, error) {
×
88
        out := new(IsBannedResponse)
×
89
        err := c.cc.Invoke(ctx, "/neutrinorpc.NeutrinoKit/IsBanned", in, out, opts...)
×
90
        if err != nil {
×
91
                return nil, err
×
92
        }
×
93
        return out, nil
×
94
}
95

96
func (c *neutrinoKitClient) GetBlockHeader(ctx context.Context, in *GetBlockHeaderRequest, opts ...grpc.CallOption) (*GetBlockHeaderResponse, error) {
×
97
        out := new(GetBlockHeaderResponse)
×
98
        err := c.cc.Invoke(ctx, "/neutrinorpc.NeutrinoKit/GetBlockHeader", in, out, opts...)
×
99
        if err != nil {
×
100
                return nil, err
×
101
        }
×
102
        return out, nil
×
103
}
104

105
func (c *neutrinoKitClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) {
×
106
        out := new(GetBlockResponse)
×
107
        err := c.cc.Invoke(ctx, "/neutrinorpc.NeutrinoKit/GetBlock", in, out, opts...)
×
108
        if err != nil {
×
109
                return nil, err
×
110
        }
×
111
        return out, nil
×
112
}
113

114
func (c *neutrinoKitClient) GetCFilter(ctx context.Context, in *GetCFilterRequest, opts ...grpc.CallOption) (*GetCFilterResponse, error) {
×
115
        out := new(GetCFilterResponse)
×
116
        err := c.cc.Invoke(ctx, "/neutrinorpc.NeutrinoKit/GetCFilter", in, out, opts...)
×
117
        if err != nil {
×
118
                return nil, err
×
119
        }
×
120
        return out, nil
×
121
}
122

123
// Deprecated: Do not use.
124
func (c *neutrinoKitClient) GetBlockHash(ctx context.Context, in *GetBlockHashRequest, opts ...grpc.CallOption) (*GetBlockHashResponse, error) {
×
125
        out := new(GetBlockHashResponse)
×
126
        err := c.cc.Invoke(ctx, "/neutrinorpc.NeutrinoKit/GetBlockHash", in, out, opts...)
×
127
        if err != nil {
×
128
                return nil, err
×
129
        }
×
130
        return out, nil
×
131
}
132

133
// NeutrinoKitServer is the server API for NeutrinoKit service.
134
// All implementations must embed UnimplementedNeutrinoKitServer
135
// for forward compatibility
136
type NeutrinoKitServer interface {
137
        // lncli: `neutrino status`
138
        // Status returns the status of the light client neutrino instance,
139
        // along with height and hash of the best block, and a list of connected
140
        // peers.
141
        Status(context.Context, *StatusRequest) (*StatusResponse, error)
142
        // lncli: `neutrino addpeer`
143
        // AddPeer adds a new peer that has already been connected to the server.
144
        AddPeer(context.Context, *AddPeerRequest) (*AddPeerResponse, error)
145
        // lncli: `neutrino disconnectpeer`
146
        // DisconnectPeer disconnects a peer by target address. Both outbound and
147
        // inbound nodes will be searched for the target node. An error message will
148
        // be returned if the peer was not found.
149
        DisconnectPeer(context.Context, *DisconnectPeerRequest) (*DisconnectPeerResponse, error)
150
        // lncli: `neutrino isbanned`
151
        // IsBanned returns true if the peer is banned, otherwise false.
152
        IsBanned(context.Context, *IsBannedRequest) (*IsBannedResponse, error)
153
        // lncli: `neutrino getblockheader`
154
        // GetBlockHeader returns a block header with a particular block hash.
155
        GetBlockHeader(context.Context, *GetBlockHeaderRequest) (*GetBlockHeaderResponse, error)
156
        // GetBlock returns a block with a particular block hash.
157
        GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error)
158
        // lncli: `neutrino getcfilter`
159
        // GetCFilter returns a compact filter from a block.
160
        GetCFilter(context.Context, *GetCFilterRequest) (*GetCFilterResponse, error)
161
        // Deprecated: Do not use.
162
        //
163
        // Deprecated, use chainrpc.GetBlockHash instead.
164
        // GetBlockHash returns the header hash of a block at a given height.
165
        GetBlockHash(context.Context, *GetBlockHashRequest) (*GetBlockHashResponse, error)
166
        mustEmbedUnimplementedNeutrinoKitServer()
167
}
168

169
// UnimplementedNeutrinoKitServer must be embedded to have forward compatible implementations.
170
type UnimplementedNeutrinoKitServer struct {
171
}
172

173
func (UnimplementedNeutrinoKitServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) {
×
174
        return nil, status.Errorf(codes.Unimplemented, "method Status not implemented")
×
175
}
×
176
func (UnimplementedNeutrinoKitServer) AddPeer(context.Context, *AddPeerRequest) (*AddPeerResponse, error) {
×
177
        return nil, status.Errorf(codes.Unimplemented, "method AddPeer not implemented")
×
178
}
×
179
func (UnimplementedNeutrinoKitServer) DisconnectPeer(context.Context, *DisconnectPeerRequest) (*DisconnectPeerResponse, error) {
×
180
        return nil, status.Errorf(codes.Unimplemented, "method DisconnectPeer not implemented")
×
181
}
×
182
func (UnimplementedNeutrinoKitServer) IsBanned(context.Context, *IsBannedRequest) (*IsBannedResponse, error) {
×
183
        return nil, status.Errorf(codes.Unimplemented, "method IsBanned not implemented")
×
184
}
×
185
func (UnimplementedNeutrinoKitServer) GetBlockHeader(context.Context, *GetBlockHeaderRequest) (*GetBlockHeaderResponse, error) {
×
186
        return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeader not implemented")
×
187
}
×
188
func (UnimplementedNeutrinoKitServer) GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error) {
×
189
        return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented")
×
190
}
×
191
func (UnimplementedNeutrinoKitServer) GetCFilter(context.Context, *GetCFilterRequest) (*GetCFilterResponse, error) {
×
192
        return nil, status.Errorf(codes.Unimplemented, "method GetCFilter not implemented")
×
193
}
×
194
func (UnimplementedNeutrinoKitServer) GetBlockHash(context.Context, *GetBlockHashRequest) (*GetBlockHashResponse, error) {
×
195
        return nil, status.Errorf(codes.Unimplemented, "method GetBlockHash not implemented")
×
196
}
×
197
func (UnimplementedNeutrinoKitServer) mustEmbedUnimplementedNeutrinoKitServer() {}
×
198

199
// UnsafeNeutrinoKitServer may be embedded to opt out of forward compatibility for this service.
200
// Use of this interface is not recommended, as added methods to NeutrinoKitServer will
201
// result in compilation errors.
202
type UnsafeNeutrinoKitServer interface {
203
        mustEmbedUnimplementedNeutrinoKitServer()
204
}
205

206
func RegisterNeutrinoKitServer(s grpc.ServiceRegistrar, srv NeutrinoKitServer) {
1✔
207
        s.RegisterService(&NeutrinoKit_ServiceDesc, srv)
1✔
208
}
1✔
209

210
func _NeutrinoKit_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
211
        in := new(StatusRequest)
×
212
        if err := dec(in); err != nil {
×
213
                return nil, err
×
214
        }
×
215
        if interceptor == nil {
×
216
                return srv.(NeutrinoKitServer).Status(ctx, in)
×
217
        }
×
218
        info := &grpc.UnaryServerInfo{
×
219
                Server:     srv,
×
220
                FullMethod: "/neutrinorpc.NeutrinoKit/Status",
×
221
        }
×
222
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
223
                return srv.(NeutrinoKitServer).Status(ctx, req.(*StatusRequest))
×
224
        }
×
225
        return interceptor(ctx, in, info, handler)
×
226
}
227

228
func _NeutrinoKit_AddPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
229
        in := new(AddPeerRequest)
×
230
        if err := dec(in); err != nil {
×
231
                return nil, err
×
232
        }
×
233
        if interceptor == nil {
×
234
                return srv.(NeutrinoKitServer).AddPeer(ctx, in)
×
235
        }
×
236
        info := &grpc.UnaryServerInfo{
×
237
                Server:     srv,
×
238
                FullMethod: "/neutrinorpc.NeutrinoKit/AddPeer",
×
239
        }
×
240
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
241
                return srv.(NeutrinoKitServer).AddPeer(ctx, req.(*AddPeerRequest))
×
242
        }
×
243
        return interceptor(ctx, in, info, handler)
×
244
}
245

246
func _NeutrinoKit_DisconnectPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
247
        in := new(DisconnectPeerRequest)
×
248
        if err := dec(in); err != nil {
×
249
                return nil, err
×
250
        }
×
251
        if interceptor == nil {
×
252
                return srv.(NeutrinoKitServer).DisconnectPeer(ctx, in)
×
253
        }
×
254
        info := &grpc.UnaryServerInfo{
×
255
                Server:     srv,
×
256
                FullMethod: "/neutrinorpc.NeutrinoKit/DisconnectPeer",
×
257
        }
×
258
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
259
                return srv.(NeutrinoKitServer).DisconnectPeer(ctx, req.(*DisconnectPeerRequest))
×
260
        }
×
261
        return interceptor(ctx, in, info, handler)
×
262
}
263

264
func _NeutrinoKit_IsBanned_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
265
        in := new(IsBannedRequest)
×
266
        if err := dec(in); err != nil {
×
267
                return nil, err
×
268
        }
×
269
        if interceptor == nil {
×
270
                return srv.(NeutrinoKitServer).IsBanned(ctx, in)
×
271
        }
×
272
        info := &grpc.UnaryServerInfo{
×
273
                Server:     srv,
×
274
                FullMethod: "/neutrinorpc.NeutrinoKit/IsBanned",
×
275
        }
×
276
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
277
                return srv.(NeutrinoKitServer).IsBanned(ctx, req.(*IsBannedRequest))
×
278
        }
×
279
        return interceptor(ctx, in, info, handler)
×
280
}
281

282
func _NeutrinoKit_GetBlockHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
283
        in := new(GetBlockHeaderRequest)
×
284
        if err := dec(in); err != nil {
×
285
                return nil, err
×
286
        }
×
287
        if interceptor == nil {
×
288
                return srv.(NeutrinoKitServer).GetBlockHeader(ctx, in)
×
289
        }
×
290
        info := &grpc.UnaryServerInfo{
×
291
                Server:     srv,
×
292
                FullMethod: "/neutrinorpc.NeutrinoKit/GetBlockHeader",
×
293
        }
×
294
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
295
                return srv.(NeutrinoKitServer).GetBlockHeader(ctx, req.(*GetBlockHeaderRequest))
×
296
        }
×
297
        return interceptor(ctx, in, info, handler)
×
298
}
299

300
func _NeutrinoKit_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
301
        in := new(GetBlockRequest)
×
302
        if err := dec(in); err != nil {
×
303
                return nil, err
×
304
        }
×
305
        if interceptor == nil {
×
306
                return srv.(NeutrinoKitServer).GetBlock(ctx, in)
×
307
        }
×
308
        info := &grpc.UnaryServerInfo{
×
309
                Server:     srv,
×
310
                FullMethod: "/neutrinorpc.NeutrinoKit/GetBlock",
×
311
        }
×
312
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
313
                return srv.(NeutrinoKitServer).GetBlock(ctx, req.(*GetBlockRequest))
×
314
        }
×
315
        return interceptor(ctx, in, info, handler)
×
316
}
317

318
func _NeutrinoKit_GetCFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
319
        in := new(GetCFilterRequest)
×
320
        if err := dec(in); err != nil {
×
321
                return nil, err
×
322
        }
×
323
        if interceptor == nil {
×
324
                return srv.(NeutrinoKitServer).GetCFilter(ctx, in)
×
325
        }
×
326
        info := &grpc.UnaryServerInfo{
×
327
                Server:     srv,
×
328
                FullMethod: "/neutrinorpc.NeutrinoKit/GetCFilter",
×
329
        }
×
330
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
331
                return srv.(NeutrinoKitServer).GetCFilter(ctx, req.(*GetCFilterRequest))
×
332
        }
×
333
        return interceptor(ctx, in, info, handler)
×
334
}
335

336
func _NeutrinoKit_GetBlockHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
×
337
        in := new(GetBlockHashRequest)
×
338
        if err := dec(in); err != nil {
×
339
                return nil, err
×
340
        }
×
341
        if interceptor == nil {
×
342
                return srv.(NeutrinoKitServer).GetBlockHash(ctx, in)
×
343
        }
×
344
        info := &grpc.UnaryServerInfo{
×
345
                Server:     srv,
×
346
                FullMethod: "/neutrinorpc.NeutrinoKit/GetBlockHash",
×
347
        }
×
348
        handler := func(ctx context.Context, req interface{}) (interface{}, error) {
×
349
                return srv.(NeutrinoKitServer).GetBlockHash(ctx, req.(*GetBlockHashRequest))
×
350
        }
×
351
        return interceptor(ctx, in, info, handler)
×
352
}
353

354
// NeutrinoKit_ServiceDesc is the grpc.ServiceDesc for NeutrinoKit service.
355
// It's only intended for direct use with grpc.RegisterService,
356
// and not to be introspected or modified (even as a copy)
357
var NeutrinoKit_ServiceDesc = grpc.ServiceDesc{
358
        ServiceName: "neutrinorpc.NeutrinoKit",
359
        HandlerType: (*NeutrinoKitServer)(nil),
360
        Methods: []grpc.MethodDesc{
361
                {
362
                        MethodName: "Status",
363
                        Handler:    _NeutrinoKit_Status_Handler,
364
                },
365
                {
366
                        MethodName: "AddPeer",
367
                        Handler:    _NeutrinoKit_AddPeer_Handler,
368
                },
369
                {
370
                        MethodName: "DisconnectPeer",
371
                        Handler:    _NeutrinoKit_DisconnectPeer_Handler,
372
                },
373
                {
374
                        MethodName: "IsBanned",
375
                        Handler:    _NeutrinoKit_IsBanned_Handler,
376
                },
377
                {
378
                        MethodName: "GetBlockHeader",
379
                        Handler:    _NeutrinoKit_GetBlockHeader_Handler,
380
                },
381
                {
382
                        MethodName: "GetBlock",
383
                        Handler:    _NeutrinoKit_GetBlock_Handler,
384
                },
385
                {
386
                        MethodName: "GetCFilter",
387
                        Handler:    _NeutrinoKit_GetCFilter_Handler,
388
                },
389
                {
390
                        MethodName: "GetBlockHash",
391
                        Handler:    _NeutrinoKit_GetBlockHash_Handler,
392
                },
393
        },
394
        Streams:  []grpc.StreamDesc{},
395
        Metadata: "neutrinorpc/neutrino.proto",
396
}
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