Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PrathyushaLakkireddy committed Sep 17, 2024
1 parent a56ab87 commit 4e4aef3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ linters:
enable:
# - depguard
- dogsled
- copyloopvar
# - copyloopvar
- goconst
- gocritic
- gci
Expand Down
2 changes: 1 addition & 1 deletion client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func GetLatestBlobStatusInfo() *cobra.Command {
`,
Example: "simd query cada get-da-status",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions keeper/vote_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type VoteExtension struct {
}

func (h *VoteExtHandler) ExtendVoteHandler() sdk.ExtendVoteHandler {
return func(ctx sdk.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) {
return func(ctx sdk.Context, _ *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) {
from := h.Keeper.GetStartHeightFromStore(ctx)
end := h.Keeper.GetEndHeightFromStore(ctx)

Expand Down Expand Up @@ -94,7 +94,7 @@ func (h *VoteExtHandler) ExtendVoteHandler() sdk.ExtendVoteHandler {
}

func (h *VoteExtHandler) VerifyVoteExtensionHandler() sdk.VerifyVoteExtensionHandler {
return func(ctx sdk.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) {
return func(ctx sdk.Context, _ *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) {

Check failure on line 97 in keeper/vote_extension.go

View workflow job for this annotation

GitHub Actions / golangci-lint

unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
// TODO: write proper validation for the votes
return &abci.ResponseVerifyVoteExtension{Status: abci.ResponseVerifyVoteExtension_ACCEPT}, nil
}
Expand Down
8 changes: 4 additions & 4 deletions relayer/submit_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func (r *Relayer) SubmitDataToAvailDA(apiURL, seed string, availAppID int, data
if event.Name == "DataAvailability.DataSubmitted" {
from, _ := registry.ProcessDecodedFieldValue[*types.AccountID](
event.Fields,
func(fieldIndex int, field *registry.DecodedField) bool {
func(_ int, field *registry.DecodedField) bool {
return field.Name == "sp_core.crypto.AccountId32.who"
},
func(value any) (*types.AccountID, error) {
Expand All @@ -252,7 +252,7 @@ func (r *Relayer) SubmitDataToAvailDA(apiURL, seed string, availAppID int, data
return nil, fmt.Errorf("unexpected value: %v", value)
}

accByteSlice, err := registry.GetDecodedFieldAsSliceOfType[types.U8](fields, func(fieldIndex int, field *registry.DecodedField) bool {
accByteSlice, err := registry.GetDecodedFieldAsSliceOfType[types.U8](fields, func(fieldIndex int, _ *registry.DecodedField) bool {
return fieldIndex == 0
})
if err != nil {
Expand All @@ -275,7 +275,7 @@ func (r *Relayer) SubmitDataToAvailDA(apiURL, seed string, availAppID int, data
fmt.Printf("from address read from event: %s \n", a)
dataHash, err := registry.ProcessDecodedFieldValue[*types.Hash](
event.Fields,
func(fieldIndex int, field *registry.DecodedField) bool {
func(fieldIndex int, _ *registry.DecodedField) bool {
return fieldIndex == 1
},
func(value any) (*types.Hash, error) {
Expand All @@ -284,7 +284,7 @@ func (r *Relayer) SubmitDataToAvailDA(apiURL, seed string, availAppID int, data
return nil, fmt.Errorf("unexpected value: %v", value)
}

hashByteSlice, err := registry.GetDecodedFieldAsSliceOfType[types.U8](fields, func(fieldIndex int, field *registry.DecodedField) bool {
hashByteSlice, err := registry.GetDecodedFieldAsSliceOfType[types.U8](fields, func(fieldIndex int, _ *registry.DecodedField) bool {
return fieldIndex == 0
})
if err != nil {
Expand Down

0 comments on commit 4e4aef3

Please sign in to comment.