mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loop: add notification versioning
This commit is contained in:
parent
460fc116d8
commit
79af5b3703
3 changed files with 390 additions and 314 deletions
|
|
@ -36,6 +36,9 @@ const (
|
|||
// connection to the server needs to be alive before we consider it a
|
||||
// successful connection.
|
||||
defaultMinAliveConnTime = time.Minute
|
||||
|
||||
// current_version is the current version of the notification listener.
|
||||
current_version = swapserverrpc.SubscribeNotificationsRequest_V1
|
||||
)
|
||||
|
||||
// Client is the interface that the notification manager needs to implement in
|
||||
|
|
@ -260,7 +263,9 @@ func (m *Manager) subscribeNotifications(ctx context.Context) error {
|
|||
defer cancel()
|
||||
|
||||
notifStream, err := m.cfg.Client.SubscribeNotifications(
|
||||
callCtx, &swapserverrpc.SubscribeNotificationsRequest{},
|
||||
callCtx, &swapserverrpc.SubscribeNotificationsRequest{
|
||||
Version: current_version,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue