Skip to content

Commit

Permalink
POS-2821: fix more lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
marcello33 committed Feb 7, 2025
1 parent 8426ba1 commit 622f913
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bridge/setu/listener/heimdall.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,18 @@ func (hl *HeimdallListener) fetchFromAndToBlock() (uint64, uint64, error) {
}

//nolint:gosec
if result, err := strconv.ParseUint(string(lastBlockBytes), 10, 64); err == nil {
if result, e := strconv.ParseUint(string(lastBlockBytes), 10, 64); e == nil {
hl.Logger.Debug("Got last block from bridge storage", "lastBlock", result)
fromBlock = result + 1
} else {
hl.Logger.Info("Error parsing last block bytes from storage", "error", err)
toBlock = 0

return fromBlock, toBlock, err
return fromBlock, toBlock, e
}
}

return fromBlock, toBlock, err
return fromBlock, toBlock, nil
}

// ProcessBlockEvent - process Blockevents (BeginBlock, EndBlock events) from heimdall.
Expand Down
2 changes: 1 addition & 1 deletion bridge/setu/listener/rootchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (rl *RootChainListener) ProcessHeader(newHeader *blockHeader) {
rl.Logger.Debug("Got last block from bridge storage", "lastBlock", string(lastBlockBytes))

//nolint:gosec
if result, err := strconv.ParseUint(string(lastBlockBytes), 10, 64); err == nil {
if result, e := strconv.ParseUint(string(lastBlockBytes), 10, 64); e == nil {
if result >= headerNumber.Uint64() {
return
}
Expand Down

0 comments on commit 622f913

Please sign in to comment.