Skip to content

Commit 536bc0d

Browse files
committed
linter: fix lint issues after linter v2 update
1 parent d4884d5 commit 536bc0d

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

aperturedb/interface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func (t *TransactionExecutor[Q]) ExecTx(ctx context.Context,
165165

166166
for i := 0; i < t.opts.numRetries; i++ {
167167
// Create the db transaction.
168-
tx, err := t.BatchedQuerier.BeginTx(ctx, txOptions)
168+
tx, err := t.BeginTx(ctx, txOptions)
169169
if err != nil {
170170
return err
171171
}

aperturedb/sqlite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func NewTestSqliteDB(t *testing.T) *SqliteStore {
167167
require.NoError(t, err)
168168

169169
t.Cleanup(func() {
170-
require.NoError(t, sqlDB.DB.Close())
170+
require.NoError(t, sqlDB.Close())
171171
})
172172

173173
return sqlDB

challenger/lnd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ func (l *LndChallenger) VerifyInvoiceStatus(hash lntypes.Hash,
366366
// Block here until our condition is met or the allowed time is
367367
// up. The Wait() will return whenever a signal is broadcast.
368368
invoiceState, hasInvoice = l.invoiceStates[hash]
369+
//nolint:staticcheck
369370
for !(hasInvoice && invoiceState == state) && !timeoutReached {
370371
l.invoicesCond.Wait()
371372

internal/test/lnd_services_mock.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ func NewMockLnd() *LndMockServices {
8181
// Also simulate the cached info that is loaded on startup.
8282
info, _ := lightningClient.GetInfo(context.Background())
8383
version, _ := versioner.GetVersion(context.Background())
84-
lnd.LndServices.NodeAlias = info.Alias
84+
lnd.NodeAlias = info.Alias
8585
lnd.LndServices.NodePubkey = info.IdentityPubkey
86-
lnd.LndServices.Version = version
86+
lnd.Version = version
8787

8888
lnd.WaitForFinished = func() {
8989
chainNotifier.WaitForFinished()

onion_store.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func newOnionStore(client *clientv3.Client) *onionStore {
3838

3939
// StorePrivateKey stores the given private key.
4040
func (s *onionStore) StorePrivateKey(privateKey []byte) error {
41-
_, err := s.Client.Put(context.Background(), onionPath, string(privateKey))
41+
_, err := s.Put(context.Background(), onionPath, string(privateKey))
4242
return err
4343
}
4444

@@ -58,6 +58,6 @@ func (s *onionStore) PrivateKey() ([]byte, error) {
5858

5959
// DeletePrivateKey securely removes the private key from the store.
6060
func (s *onionStore) DeletePrivateKey() error {
61-
_, err := s.Client.Delete(context.Background(), onionPath)
61+
_, err := s.Delete(context.Background(), onionPath)
6262
return err
6363
}

proxy/service.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ func prepareServices(services []*Service) error {
200200

201201
// There are two supported formats to encode the file
202202
// content in: hex and base64.
203-
switch {
204-
case prefix == filePrefixHex:
203+
switch prefix {
204+
case filePrefixHex:
205205
newValue := hex.EncodeToString(bytes)
206206
service.Headers[key] = newValue
207207

208-
case prefix == filePrefixBase64:
208+
case filePrefixBase64:
209209
newValue := base64.StdEncoding.EncodeToString(
210210
bytes,
211211
)

0 commit comments

Comments
 (0)