Skip to content

Commit

Permalink
fix(lint): fix lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed Jan 25, 2023
1 parent 7c327a4 commit e8a7d93
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/actor/synchronization/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type NewBlockEvent struct {
Height int64 `json:"height"`
Time time.Time `json:"time"`
Signatures []types.CommitSig `json:"signatures"`
MsgVotes []v1.MsgVote `json:"omitempty,msgVotes"`
MsgVotes []v1.MsgVote `json:"msgVotes,omitempty"`
}

func (e *NewBlockEvent) Marshal() (map[string]interface{}, error) {
Expand Down
2 changes: 1 addition & 1 deletion app/nemeton/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ func (s *Store) CompleteVoteProposalTask(ctx context.Context, when time.Time, ms
return fmt.Errorf("could not retrieve linked proposal ID for task %s", task.ID)
}

addrs := make([]types.AccAddress, len(msgVotes))
addrs := make([]types.AccAddress, 0, len(msgVotes))
for _, vote := range msgVotes {
if vote.ProposalId == *proposalID {
addr, err := types.AccAddressFromBech32(vote.Voter)
Expand Down
6 changes: 3 additions & 3 deletions app/nemeton/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const (
TaskTypeVoteProposal = "vote-proposal"

taskParamMaxPoints = "max-points"
taskParamProposalId = "proposal-id"
taskParamProposalID = "proposal-id"
)

type TaskState struct {
Expand Down Expand Up @@ -76,7 +76,7 @@ func (t Task) GetParamMaxPoints() *uint64 {
}

func (t Task) GetParamProposalID() *uint64 {
if v, ok := t.Params[taskParamProposalId]; ok {
if v, ok := t.Params[taskParamProposalID]; ok {
if proposalID, ok := v.(int64); ok {
p := uint64(proposalID)
return &p
Expand Down Expand Up @@ -141,6 +141,6 @@ func makeDashboardTask(id, name, description string, start, end time.Time, maxPo

func makeVoteProposalTask(id, name, description string, start, end time.Time, rewards uint64, proposalID uint64) Task {
return makeTask(TaskTypeVoteProposal, id, name, description, start, end, &rewards, map[string]interface{}{
taskParamProposalId: proposalID,
taskParamProposalID: proposalID,
})
}

0 comments on commit e8a7d93

Please sign in to comment.