Skip to content

Commit b695080

Browse files
committed
all: add whitespace linter
1 parent f2df643 commit b695080

File tree

32 files changed

+22
-83
lines changed

32 files changed

+22
-83
lines changed

.golangci-lint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
linters:
22
enable:
33
- bodyclose
4+
- whitespace
45

56
issues:
67
exclude-rules:

pkg/code/antispam/airdrop.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ func (g *Guard) AllowReferralBonus(
220220
recordDenialEvent(ctx, actionReferralBonus, "region restricted")
221221
return false, nil
222222
}
223-
224223
}
225224

226225
// Deny from mobile networks where we're currently under attack

pkg/code/antispam/guard_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ func TestAllowReceivePayments_StaffUser(t *testing.T) {
375375
}))
376376

377377
for _, ownerAccount := range []*common.Account{ownerAccount1, ownerAccount2} {
378-
379378
verification := &phone.Verification{
380379
PhoneNumber: phoneNumber,
381380
OwnerAccount: ownerAccount.PublicKey().ToBase58(),
@@ -508,7 +507,6 @@ func TestAllowOpenAccounts_StaffUser(t *testing.T) {
508507
}))
509508

510509
for _, ownerAccount := range []*common.Account{ownerAccount1, ownerAccount2} {
511-
512510
verification := &phone.Verification{
513511
PhoneNumber: phoneNumber,
514512
OwnerAccount: ownerAccount.PublicKey().ToBase58(),

pkg/code/async/commitment/service.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ func New(data code_data.Provider) async.Service {
2424
}
2525

2626
func (p *service) Start(ctx context.Context, interval time.Duration) error {
27-
2827
// Setup workers to watch for commitment state changes on the Solana side
2928
for _, item := range []commitment.State{
3029
commitment.StateReadyToOpen,
@@ -38,7 +37,6 @@ func (p *service) Start(ctx context.Context, interval time.Duration) error {
3837
if err != nil && err != context.Canceled {
3938
p.log.WithError(err).Warnf("commitment processing loop terminated unexpectedly for state %d", state)
4039
}
41-
4240
}(item)
4341
}
4442

pkg/code/async/geyser/external_deposit.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ func findPotentialExternalDeposits(ctx context.Context, data code_data.Provider,
7676
var cursor []byte
7777
var totalTransactionsFound int
7878
for {
79-
8079
history, err := data.GetBlockchainHistory(
8180
ctx,
8281
vault.PublicKey().ToBase58(),
@@ -201,7 +200,6 @@ func processPotentialExternalDeposit(ctx context.Context, conf *conf, data code_
201200
// todo: Below logic is beginning to get messy and might be in need of a
202201
// refactor soon
203202
switch accountInfoRecord.AccountType {
204-
205203
case commonpb.AccountType_PRIMARY, commonpb.AccountType_RELATIONSHIP:
206204
// Check whether we've previously processed this external deposit
207205
_, err = data.GetExternalDeposit(ctx, signature, tokenAccount.PublicKey().ToBase58())

pkg/code/async/geyser/handler.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ func (h *TokenProgramAccountHandler) Handle(ctx context.Context, update *geyserp
102102
}
103103

104104
switch mintAccount.PublicKey().ToBase58() {
105-
106105
case common.KinMintAccount.PublicKey().ToBase58():
107106
// Not a program vault account, so filter it out. It cannot be a Timelock
108107
// account.

pkg/code/async/nonce/allocator.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
)
1313

1414
func (p *service) generateNonceAccounts(serviceCtx context.Context) error {
15-
1615
hasWarnedUser := false
1716
err := retry.Loop(
1817
func() (err error) {
@@ -70,7 +69,6 @@ func (p *service) generateNonceAccounts(serviceCtx context.Context) error {
7069
}
7170

7271
return nil
73-
7472
},
7573
retry.NonRetriableErrors(context.Canceled, ErrInvalidNonceLimitExceeded),
7674
)

pkg/code/async/nonce/pool.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ func (p *service) worker(serviceCtx context.Context, state nonce.State, interval
7474
}
7575

7676
func (p *service) handle(ctx context.Context, record *nonce.Record) error {
77-
7877
/*
7978
Finite state machine:
8079
States:

pkg/code/async/sequencer/service.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ func New(data code_data.Provider, scheduler Scheduler, configProvider ConfigProv
4343
}
4444

4545
func (p *service) Start(ctx context.Context, interval time.Duration) error {
46-
4746
// Setup workers to watch for fulfillment state changes on the Solana side
4847
for _, item := range []fulfillment.State{
4948
fulfillment.StateUnknown,
@@ -55,15 +54,13 @@ func (p *service) Start(ctx context.Context, interval time.Duration) error {
5554
// fulfillment.StateRevoked,
5655
} {
5756
go func(state fulfillment.State) {
58-
5957
// todo: Note to our future selves that there are some components of
6058
// the scheduler (ie. subsidizer balance checks) that won't
6159
// work perfectly in a multi-threaded or multi-node environment.
6260
err := p.worker(ctx, state, interval)
6361
if err != nil && err != context.Canceled {
6462
p.log.WithError(err).Warnf("fulfillment processing loop terminated unexpectedly for state %d", state)
6563
}
66-
6764
}(item)
6865
}
6966

pkg/code/async/treasury/service.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,10 @@ func (p *service) Start(ctx context.Context, interval time.Duration) error {
3535
// treasury.TreasuryPoolStateDeprecated,
3636
} {
3737
go func(state treasury.TreasuryPoolState) {
38-
3938
err := p.worker(ctx, state, interval)
4039
if err != nil && err != context.Canceled {
4140
p.log.WithError(err).Warnf("pool processing loop terminated unexpectedly for state %d", state)
4241
}
43-
4442
}(item)
4543
}
4644

0 commit comments

Comments
 (0)