Skip to content

Commit

Permalink
Add entry to golinter for hardcoded credentials being ignored in test…
Browse files Browse the repository at this point in the history
… file
  • Loading branch information
mdulin2 authored and johnsaigle committed Nov 22, 2024
1 parent 53c2ce2 commit 6cf347d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ issues:
text: "^func.*supervisor.*(waitSettle|waitSettleError).*$"
linters:
- unused
- path: pkg/transfer-verifier/transfer-verifier-sui_test.go
text: "G101: Potential hardcoded credentials"
7 changes: 4 additions & 3 deletions node/pkg/transfer-verifier/transfer-verifier-sui.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (s *SuiTransferVerifier) GetEventFilter() string {
// that maps the token address and chain ID to the amount requested out of the bridge. It does not return an error, because any faulty
// events can be skipped, since they would likely fail being processed by the guardian as well. Debug level logging can be used to
// reveal any potential locations where errors are occurring.
func (s *SuiTransferVerifier) processEvents(events []SuiEvent, logger *zap.Logger) (requestedOutOfBridge map[string]*big.Int, numEventsProcessed int) {
func (s *SuiTransferVerifier) processEvents(events []SuiEvent, logger *zap.Logger) (requestedOutOfBridge map[string]*big.Int, numEventsProcessed uint) {
// Initialize the map to store the amount requested out of the bridge
requestedOutOfBridge = make(map[string]*big.Int)

Expand Down Expand Up @@ -205,9 +205,10 @@ func (s *SuiTransferVerifier) ProcessDigest(digest string, suiApiConnection SuiA
zap.String("amountIn", amountIn.String()))
}

logger.Info("Digest processed", zap.String("txDigest", digest), zap.Int("numEventsProcessed", numEventsProcessed), zap.Int("numChangesProcessed", numChangesProcessed))
//nolint:gosec
logger.Info("Digest processed", zap.String("txDigest", digest), zap.Int("numEventsProcessed", int(numEventsProcessed)), zap.Int("numChangesProcessed", numChangesProcessed))

return uint(numEventsProcessed), nil
return numEventsProcessed, nil
}

type SuiApiResponse interface {
Expand Down

0 comments on commit 6cf347d

Please sign in to comment.