mirror of
https://github.com/lightninglabs/aperture.git
synced 2025-12-17 00:54:20 +01:00
linter: fix lint issues after linter v2 update
This commit is contained in:
@@ -165,7 +165,7 @@ func (t *TransactionExecutor[Q]) ExecTx(ctx context.Context,
|
||||
|
||||
for i := 0; i < t.opts.numRetries; i++ {
|
||||
// Create the db transaction.
|
||||
tx, err := t.BatchedQuerier.BeginTx(ctx, txOptions)
|
||||
tx, err := t.BeginTx(ctx, txOptions)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ func NewTestSqliteDB(t *testing.T) *SqliteStore {
|
||||
require.NoError(t, err)
|
||||
|
||||
t.Cleanup(func() {
|
||||
require.NoError(t, sqlDB.DB.Close())
|
||||
require.NoError(t, sqlDB.Close())
|
||||
})
|
||||
|
||||
return sqlDB
|
||||
|
||||
@@ -366,6 +366,7 @@ func (l *LndChallenger) VerifyInvoiceStatus(hash lntypes.Hash,
|
||||
// Block here until our condition is met or the allowed time is
|
||||
// up. The Wait() will return whenever a signal is broadcast.
|
||||
invoiceState, hasInvoice = l.invoiceStates[hash]
|
||||
//nolint:staticcheck
|
||||
for !(hasInvoice && invoiceState == state) && !timeoutReached {
|
||||
l.invoicesCond.Wait()
|
||||
|
||||
|
||||
@@ -81,9 +81,9 @@ func NewMockLnd() *LndMockServices {
|
||||
// Also simulate the cached info that is loaded on startup.
|
||||
info, _ := lightningClient.GetInfo(context.Background())
|
||||
version, _ := versioner.GetVersion(context.Background())
|
||||
lnd.LndServices.NodeAlias = info.Alias
|
||||
lnd.NodeAlias = info.Alias
|
||||
lnd.LndServices.NodePubkey = info.IdentityPubkey
|
||||
lnd.LndServices.Version = version
|
||||
lnd.Version = version
|
||||
|
||||
lnd.WaitForFinished = func() {
|
||||
chainNotifier.WaitForFinished()
|
||||
|
||||
@@ -38,7 +38,7 @@ func newOnionStore(client *clientv3.Client) *onionStore {
|
||||
|
||||
// StorePrivateKey stores the given private key.
|
||||
func (s *onionStore) StorePrivateKey(privateKey []byte) error {
|
||||
_, err := s.Client.Put(context.Background(), onionPath, string(privateKey))
|
||||
_, err := s.Put(context.Background(), onionPath, string(privateKey))
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -58,6 +58,6 @@ func (s *onionStore) PrivateKey() ([]byte, error) {
|
||||
|
||||
// DeletePrivateKey securely removes the private key from the store.
|
||||
func (s *onionStore) DeletePrivateKey() error {
|
||||
_, err := s.Client.Delete(context.Background(), onionPath)
|
||||
_, err := s.Delete(context.Background(), onionPath)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -200,12 +200,12 @@ func prepareServices(services []*Service) error {
|
||||
|
||||
// There are two supported formats to encode the file
|
||||
// content in: hex and base64.
|
||||
switch {
|
||||
case prefix == filePrefixHex:
|
||||
switch prefix {
|
||||
case filePrefixHex:
|
||||
newValue := hex.EncodeToString(bytes)
|
||||
service.Headers[key] = newValue
|
||||
|
||||
case prefix == filePrefixBase64:
|
||||
case filePrefixBase64:
|
||||
newValue := base64.StdEncoding.EncodeToString(
|
||||
bytes,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user