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

lightningnetwork / lnd / 13481890706

23 Feb 2025 09:53AM UTC coverage: 46.221% (-12.6%) from 58.825%
13481890706

Pull #9521

github

web-flow
Merge 9fb980a6f into 5fe900d18
Pull Request #9521: unit: remove GOACC, use Go 1.20 native coverage functionality

105094 of 227374 relevant lines covered (46.22%)

19705.84 hits per line

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

0.0
/lnrpc/chainrpc/chainnotifier_grpc.pb.go
1
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2

3
package chainrpc
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
// ChainNotifierClient is the client API for ChainNotifier 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 ChainNotifierClient interface {
21
        // RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
22
        // registers an intent for a client to be notified once a confirmation request
23
        // has reached its required number of confirmations on-chain.
24
        //
25
        // A confirmation request must have a valid output script. It is also possible
26
        // to give a transaction ID. If the transaction ID is not set, a notification
27
        // is sent once the output script confirms. If the transaction ID is also set,
28
        // a notification is sent once the output script confirms in the given
29
        // transaction.
30
        RegisterConfirmationsNtfn(ctx context.Context, in *ConfRequest, opts ...grpc.CallOption) (ChainNotifier_RegisterConfirmationsNtfnClient, error)
31
        // RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
32
        // intent for a client to be notification once a spend request has been spent
33
        // by a transaction that has confirmed on-chain.
34
        //
35
        // A client can specify whether the spend request should be for a particular
36
        // outpoint  or for an output script by specifying a zero outpoint.
37
        RegisterSpendNtfn(ctx context.Context, in *SpendRequest, opts ...grpc.CallOption) (ChainNotifier_RegisterSpendNtfnClient, error)
38
        // RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
39
        // registers an intent for a client to be notified of blocks in the chain. The
40
        // stream will return a hash and height tuple of a block for each new/stale
41
        // block in the chain. It is the client's responsibility to determine whether
42
        // the tuple returned is for a new or stale block in the chain.
43
        //
44
        // A client can also request a historical backlog of blocks from a particular
45
        // point. This allows clients to be idempotent by ensuring that they do not
46
        // missing processing a single block within the chain.
47
        RegisterBlockEpochNtfn(ctx context.Context, in *BlockEpoch, opts ...grpc.CallOption) (ChainNotifier_RegisterBlockEpochNtfnClient, error)
48
}
49

50
type chainNotifierClient struct {
51
        cc grpc.ClientConnInterface
52
}
53

54
func NewChainNotifierClient(cc grpc.ClientConnInterface) ChainNotifierClient {
×
55
        return &chainNotifierClient{cc}
×
56
}
×
57

58
func (c *chainNotifierClient) RegisterConfirmationsNtfn(ctx context.Context, in *ConfRequest, opts ...grpc.CallOption) (ChainNotifier_RegisterConfirmationsNtfnClient, error) {
×
59
        stream, err := c.cc.NewStream(ctx, &ChainNotifier_ServiceDesc.Streams[0], "/chainrpc.ChainNotifier/RegisterConfirmationsNtfn", opts...)
×
60
        if err != nil {
×
61
                return nil, err
×
62
        }
×
63
        x := &chainNotifierRegisterConfirmationsNtfnClient{stream}
×
64
        if err := x.ClientStream.SendMsg(in); err != nil {
×
65
                return nil, err
×
66
        }
×
67
        if err := x.ClientStream.CloseSend(); err != nil {
×
68
                return nil, err
×
69
        }
×
70
        return x, nil
×
71
}
72

73
type ChainNotifier_RegisterConfirmationsNtfnClient interface {
74
        Recv() (*ConfEvent, error)
75
        grpc.ClientStream
76
}
77

78
type chainNotifierRegisterConfirmationsNtfnClient struct {
79
        grpc.ClientStream
80
}
81

82
func (x *chainNotifierRegisterConfirmationsNtfnClient) Recv() (*ConfEvent, error) {
×
83
        m := new(ConfEvent)
×
84
        if err := x.ClientStream.RecvMsg(m); err != nil {
×
85
                return nil, err
×
86
        }
×
87
        return m, nil
×
88
}
89

90
func (c *chainNotifierClient) RegisterSpendNtfn(ctx context.Context, in *SpendRequest, opts ...grpc.CallOption) (ChainNotifier_RegisterSpendNtfnClient, error) {
×
91
        stream, err := c.cc.NewStream(ctx, &ChainNotifier_ServiceDesc.Streams[1], "/chainrpc.ChainNotifier/RegisterSpendNtfn", opts...)
×
92
        if err != nil {
×
93
                return nil, err
×
94
        }
×
95
        x := &chainNotifierRegisterSpendNtfnClient{stream}
×
96
        if err := x.ClientStream.SendMsg(in); err != nil {
×
97
                return nil, err
×
98
        }
×
99
        if err := x.ClientStream.CloseSend(); err != nil {
×
100
                return nil, err
×
101
        }
×
102
        return x, nil
×
103
}
104

105
type ChainNotifier_RegisterSpendNtfnClient interface {
106
        Recv() (*SpendEvent, error)
107
        grpc.ClientStream
108
}
109

110
type chainNotifierRegisterSpendNtfnClient struct {
111
        grpc.ClientStream
112
}
113

114
func (x *chainNotifierRegisterSpendNtfnClient) Recv() (*SpendEvent, error) {
×
115
        m := new(SpendEvent)
×
116
        if err := x.ClientStream.RecvMsg(m); err != nil {
×
117
                return nil, err
×
118
        }
×
119
        return m, nil
×
120
}
121

122
func (c *chainNotifierClient) RegisterBlockEpochNtfn(ctx context.Context, in *BlockEpoch, opts ...grpc.CallOption) (ChainNotifier_RegisterBlockEpochNtfnClient, error) {
×
123
        stream, err := c.cc.NewStream(ctx, &ChainNotifier_ServiceDesc.Streams[2], "/chainrpc.ChainNotifier/RegisterBlockEpochNtfn", opts...)
×
124
        if err != nil {
×
125
                return nil, err
×
126
        }
×
127
        x := &chainNotifierRegisterBlockEpochNtfnClient{stream}
×
128
        if err := x.ClientStream.SendMsg(in); err != nil {
×
129
                return nil, err
×
130
        }
×
131
        if err := x.ClientStream.CloseSend(); err != nil {
×
132
                return nil, err
×
133
        }
×
134
        return x, nil
×
135
}
136

137
type ChainNotifier_RegisterBlockEpochNtfnClient interface {
138
        Recv() (*BlockEpoch, error)
139
        grpc.ClientStream
140
}
141

142
type chainNotifierRegisterBlockEpochNtfnClient struct {
143
        grpc.ClientStream
144
}
145

146
func (x *chainNotifierRegisterBlockEpochNtfnClient) Recv() (*BlockEpoch, error) {
×
147
        m := new(BlockEpoch)
×
148
        if err := x.ClientStream.RecvMsg(m); err != nil {
×
149
                return nil, err
×
150
        }
×
151
        return m, nil
×
152
}
153

154
// ChainNotifierServer is the server API for ChainNotifier service.
155
// All implementations must embed UnimplementedChainNotifierServer
156
// for forward compatibility
157
type ChainNotifierServer interface {
158
        // RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
159
        // registers an intent for a client to be notified once a confirmation request
160
        // has reached its required number of confirmations on-chain.
161
        //
162
        // A confirmation request must have a valid output script. It is also possible
163
        // to give a transaction ID. If the transaction ID is not set, a notification
164
        // is sent once the output script confirms. If the transaction ID is also set,
165
        // a notification is sent once the output script confirms in the given
166
        // transaction.
167
        RegisterConfirmationsNtfn(*ConfRequest, ChainNotifier_RegisterConfirmationsNtfnServer) error
168
        // RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
169
        // intent for a client to be notification once a spend request has been spent
170
        // by a transaction that has confirmed on-chain.
171
        //
172
        // A client can specify whether the spend request should be for a particular
173
        // outpoint  or for an output script by specifying a zero outpoint.
174
        RegisterSpendNtfn(*SpendRequest, ChainNotifier_RegisterSpendNtfnServer) error
175
        // RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
176
        // registers an intent for a client to be notified of blocks in the chain. The
177
        // stream will return a hash and height tuple of a block for each new/stale
178
        // block in the chain. It is the client's responsibility to determine whether
179
        // the tuple returned is for a new or stale block in the chain.
180
        //
181
        // A client can also request a historical backlog of blocks from a particular
182
        // point. This allows clients to be idempotent by ensuring that they do not
183
        // missing processing a single block within the chain.
184
        RegisterBlockEpochNtfn(*BlockEpoch, ChainNotifier_RegisterBlockEpochNtfnServer) error
185
        mustEmbedUnimplementedChainNotifierServer()
186
}
187

188
// UnimplementedChainNotifierServer must be embedded to have forward compatible implementations.
189
type UnimplementedChainNotifierServer struct {
190
}
191

192
func (UnimplementedChainNotifierServer) RegisterConfirmationsNtfn(*ConfRequest, ChainNotifier_RegisterConfirmationsNtfnServer) error {
×
193
        return status.Errorf(codes.Unimplemented, "method RegisterConfirmationsNtfn not implemented")
×
194
}
×
195
func (UnimplementedChainNotifierServer) RegisterSpendNtfn(*SpendRequest, ChainNotifier_RegisterSpendNtfnServer) error {
×
196
        return status.Errorf(codes.Unimplemented, "method RegisterSpendNtfn not implemented")
×
197
}
×
198
func (UnimplementedChainNotifierServer) RegisterBlockEpochNtfn(*BlockEpoch, ChainNotifier_RegisterBlockEpochNtfnServer) error {
×
199
        return status.Errorf(codes.Unimplemented, "method RegisterBlockEpochNtfn not implemented")
×
200
}
×
201
func (UnimplementedChainNotifierServer) mustEmbedUnimplementedChainNotifierServer() {}
×
202

203
// UnsafeChainNotifierServer may be embedded to opt out of forward compatibility for this service.
204
// Use of this interface is not recommended, as added methods to ChainNotifierServer will
205
// result in compilation errors.
206
type UnsafeChainNotifierServer interface {
207
        mustEmbedUnimplementedChainNotifierServer()
208
}
209

210
func RegisterChainNotifierServer(s grpc.ServiceRegistrar, srv ChainNotifierServer) {
×
211
        s.RegisterService(&ChainNotifier_ServiceDesc, srv)
×
212
}
×
213

214
func _ChainNotifier_RegisterConfirmationsNtfn_Handler(srv interface{}, stream grpc.ServerStream) error {
×
215
        m := new(ConfRequest)
×
216
        if err := stream.RecvMsg(m); err != nil {
×
217
                return err
×
218
        }
×
219
        return srv.(ChainNotifierServer).RegisterConfirmationsNtfn(m, &chainNotifierRegisterConfirmationsNtfnServer{stream})
×
220
}
221

222
type ChainNotifier_RegisterConfirmationsNtfnServer interface {
223
        Send(*ConfEvent) error
224
        grpc.ServerStream
225
}
226

227
type chainNotifierRegisterConfirmationsNtfnServer struct {
228
        grpc.ServerStream
229
}
230

231
func (x *chainNotifierRegisterConfirmationsNtfnServer) Send(m *ConfEvent) error {
×
232
        return x.ServerStream.SendMsg(m)
×
233
}
×
234

235
func _ChainNotifier_RegisterSpendNtfn_Handler(srv interface{}, stream grpc.ServerStream) error {
×
236
        m := new(SpendRequest)
×
237
        if err := stream.RecvMsg(m); err != nil {
×
238
                return err
×
239
        }
×
240
        return srv.(ChainNotifierServer).RegisterSpendNtfn(m, &chainNotifierRegisterSpendNtfnServer{stream})
×
241
}
242

243
type ChainNotifier_RegisterSpendNtfnServer interface {
244
        Send(*SpendEvent) error
245
        grpc.ServerStream
246
}
247

248
type chainNotifierRegisterSpendNtfnServer struct {
249
        grpc.ServerStream
250
}
251

252
func (x *chainNotifierRegisterSpendNtfnServer) Send(m *SpendEvent) error {
×
253
        return x.ServerStream.SendMsg(m)
×
254
}
×
255

256
func _ChainNotifier_RegisterBlockEpochNtfn_Handler(srv interface{}, stream grpc.ServerStream) error {
×
257
        m := new(BlockEpoch)
×
258
        if err := stream.RecvMsg(m); err != nil {
×
259
                return err
×
260
        }
×
261
        return srv.(ChainNotifierServer).RegisterBlockEpochNtfn(m, &chainNotifierRegisterBlockEpochNtfnServer{stream})
×
262
}
263

264
type ChainNotifier_RegisterBlockEpochNtfnServer interface {
265
        Send(*BlockEpoch) error
266
        grpc.ServerStream
267
}
268

269
type chainNotifierRegisterBlockEpochNtfnServer struct {
270
        grpc.ServerStream
271
}
272

273
func (x *chainNotifierRegisterBlockEpochNtfnServer) Send(m *BlockEpoch) error {
×
274
        return x.ServerStream.SendMsg(m)
×
275
}
×
276

277
// ChainNotifier_ServiceDesc is the grpc.ServiceDesc for ChainNotifier service.
278
// It's only intended for direct use with grpc.RegisterService,
279
// and not to be introspected or modified (even as a copy)
280
var ChainNotifier_ServiceDesc = grpc.ServiceDesc{
281
        ServiceName: "chainrpc.ChainNotifier",
282
        HandlerType: (*ChainNotifierServer)(nil),
283
        Methods:     []grpc.MethodDesc{},
284
        Streams: []grpc.StreamDesc{
285
                {
286
                        StreamName:    "RegisterConfirmationsNtfn",
287
                        Handler:       _ChainNotifier_RegisterConfirmationsNtfn_Handler,
288
                        ServerStreams: true,
289
                },
290
                {
291
                        StreamName:    "RegisterSpendNtfn",
292
                        Handler:       _ChainNotifier_RegisterSpendNtfn_Handler,
293
                        ServerStreams: true,
294
                },
295
                {
296
                        StreamName:    "RegisterBlockEpochNtfn",
297
                        Handler:       _ChainNotifier_RegisterBlockEpochNtfn_Handler,
298
                        ServerStreams: true,
299
                },
300
        },
301
        Metadata: "chainrpc/chainnotifier.proto",
302
}
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