@@ -31,22 +31,22 @@ type WtClientClient interface {
3131}
3232
3333type PolicyResponse struct {
34- maxUpdates uint32
34+ maxUpdates uint32
3535 sweepSatPerVbyte uint32
3636}
3737
3838type StatsResponse struct {
39- numBackups uint32
40- numPendingBackups uint32
41- numFailedBackups uint32
42- numSessionsAcquired uint32
39+ numBackups uint32
40+ numPendingBackups uint32
41+ numFailedBackups uint32
42+ numSessionsAcquired uint32
4343 numSessionsExhausted uint32
4444}
4545
4646type wtClientClient struct {
47- client wtclientrpc.WatchtowerClientClient
48- wtClientMac serializedMacaroon
49- timeout time.Duration
47+ client wtclientrpc.WatchtowerClientClient
48+ wtClientMac serializedMacaroon
49+ timeout time.Duration
5050}
5151
5252// A compile time check to ensure that wtClientClient implements the
@@ -77,7 +77,7 @@ func (m *wtClientClient) AddTower(ctx context.Context, pubkey []byte, address st
7777 defer cancel ()
7878
7979 rpcReq := & wtclientrpc.AddTowerRequest {
80- Pubkey : pubkey ,
80+ Pubkey : pubkey ,
8181 Address : address ,
8282 }
8383
@@ -106,14 +106,14 @@ func (m *wtClientClient) DeactivateTower(ctx context.Context, pubkey []byte) (st
106106}
107107
108108func (m * wtClientClient ) GetTowerInfo (ctx context.Context , pubkey []byte , includeSessions ,
109- excludeExhaustedSessions bool ) (* wtclientrpc.Tower , error ) {
109+ excludeExhaustedSessions bool ) (* wtclientrpc.Tower , error ) {
110110 rpcCtx , cancel := context .WithTimeout (ctx , m .timeout )
111111 defer cancel ()
112112
113113 rpcCtx = m .wtClientMac .WithMacaroonAuth (rpcCtx )
114114 resp , err := m .client .GetTowerInfo (rpcCtx , & wtclientrpc.GetTowerInfoRequest {
115- Pubkey : pubkey ,
116- IncludeSessions : includeSessions ,
115+ Pubkey : pubkey ,
116+ IncludeSessions : includeSessions ,
117117 ExcludeExhaustedSessions : excludeExhaustedSessions ,
118118 })
119119 if err != nil {
@@ -124,13 +124,13 @@ func (m *wtClientClient) GetTowerInfo(ctx context.Context, pubkey []byte, includ
124124}
125125
126126func (m * wtClientClient ) ListTowers (ctx context.Context , includeSessions ,
127- excludeExhaustedSessions bool ) ([]* wtclientrpc.Tower , error ) {
127+ excludeExhaustedSessions bool ) ([]* wtclientrpc.Tower , error ) {
128128 rpcCtx , cancel := context .WithTimeout (ctx , m .timeout )
129129 defer cancel ()
130130
131131 rpcCtx = m .wtClientMac .WithMacaroonAuth (rpcCtx )
132132 resp , err := m .client .ListTowers (rpcCtx , & wtclientrpc.ListTowersRequest {
133- IncludeSessions : includeSessions ,
133+ IncludeSessions : includeSessions ,
134134 ExcludeExhaustedSessions : excludeExhaustedSessions ,
135135 })
136136 if err != nil {
@@ -153,7 +153,7 @@ func (m *wtClientClient) Policy(ctx context.Context, policyType wtclientrpc.Poli
153153 }
154154
155155 return & PolicyResponse {
156- maxUpdates : resp .MaxUpdates ,
156+ maxUpdates : resp .MaxUpdates ,
157157 sweepSatPerVbyte : resp .SweepSatPerVbyte ,
158158 }, nil
159159}
@@ -163,7 +163,7 @@ func (m *wtClientClient) RemoveTower(ctx context.Context, pubkey []byte, address
163163
164164 rpcCtx = m .wtClientMac .WithMacaroonAuth (rpcCtx )
165165 _ , err := m .client .RemoveTower (rpcCtx , & wtclientrpc.RemoveTowerRequest {
166- Pubkey : pubkey ,
166+ Pubkey : pubkey ,
167167 Address : address ,
168168 })
169169 if err != nil {
@@ -184,10 +184,10 @@ func (m *wtClientClient) Stats(ctx context.Context) (*StatsResponse, error) {
184184 }
185185
186186 return & StatsResponse {
187- numBackups : resp .NumBackups ,
188- numPendingBackups : resp .NumPendingBackups ,
189- numFailedBackups : resp .NumFailedBackups ,
190- numSessionsAcquired : resp .NumSessionsAcquired ,
187+ numBackups : resp .NumBackups ,
188+ numPendingBackups : resp .NumPendingBackups ,
189+ numFailedBackups : resp .NumFailedBackups ,
190+ numSessionsAcquired : resp .NumSessionsAcquired ,
191191 numSessionsExhausted : resp .NumSessionsExhausted ,
192192 }, nil
193193}
0 commit comments