Skip to content

Commit

Permalink
Fix lint failures
Browse files Browse the repository at this point in the history
Signed-off-by: rodion <[email protected]>
  • Loading branch information
rodion-lim-partior committed Sep 6, 2024
1 parent a8a5247 commit f9c618e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func configCommand() *cobra.Command {
Use: "docs",
Short: "Prints the config info as markdown",
Long: "",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
InitConfig()
b, err := config.GenerateConfigMarkdown(context.Background(), "", config.GetKnownKeys())
fmt.Println(string(b))
Expand Down
2 changes: 1 addition & 1 deletion cmd/evmconnect.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var rootCmd = &cobra.Command{
Use: "evmconnect",
Short: "Hyperledger FireFly Connector for EVM based blockchains",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
return run()
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func versionCommand() *cobra.Command {
Use: "version",
Short: "Prints the version info",
Long: "",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {

info := &Info{
Version: BuildVersionOverride,
Expand Down
6 changes: 3 additions & 3 deletions internal/ethereum/blocklistener.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (bl *blockListener) newHeadsSubListener() {
// getBlockHeightWithRetry keeps retrying attempting to get the initial block height until successful
func (bl *blockListener) establishBlockHeightWithRetry() error {
wsConnected := false
return bl.c.retry.Do(bl.ctx, "get initial block height", func(attempt int) (retry bool, err error) {
return bl.c.retry.Do(bl.ctx, "get initial block height", func(_ int) (retry bool, err error) {

// If we have a WebSocket backend, then we connect it and switch over to using it
// (we accept an un-locked update here to backend, as the most important routine that's
Expand Down Expand Up @@ -404,7 +404,7 @@ func (bl *blockListener) rebuildCanonicalChain() *list.Element {
for {
var bi *blockInfoJSONRPC
var reason ffcapi.ErrorReason
err := bl.c.retry.Do(bl.ctx, "rebuild listener canonical chain", func(attempt int) (retry bool, err error) {
err := bl.c.retry.Do(bl.ctx, "rebuild listener canonical chain", func(_ int) (retry bool, err error) {
bi, reason, err = bl.getBlockInfoByNumber(bl.ctx, nextBlockNumber, false, "")
return reason != ffcapi.ErrorReasonNotFound, err
})
Expand Down Expand Up @@ -458,7 +458,7 @@ func (bl *blockListener) trimToLastValidBlock() (lastValidBlock *minimalBlockInf
currentViewBlock := lastElem.Value.(*minimalBlockInfo)
var freshBlockInfo *blockInfoJSONRPC
var reason ffcapi.ErrorReason
err := bl.c.retry.Do(bl.ctx, "rebuild listener canonical chain", func(attempt int) (retry bool, err error) {
err := bl.c.retry.Do(bl.ctx, "rebuild listener canonical chain", func(_ int) (retry bool, err error) {
freshBlockInfo, reason, err = bl.getBlockInfoByNumber(bl.ctx, currentViewBlock.number, false, "")
return reason != ffcapi.ErrorReasonNotFound, err
})
Expand Down

0 comments on commit f9c618e

Please sign in to comment.