Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
0Tech authored Oct 14, 2022
1 parent d177a6a commit ded8679
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions x/foundation/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ func (i FoundationInfo) ValidateBasic() error {
return err
}

_, outsourcing := i.GetDecisionPolicy().(*OutsourcingDecisionPolicy)
var outsourcing bool
_, outsourcing = i.GetDecisionPolicy().(*OutsourcingDecisionPolicy)
memberExists := !i.TotalWeight.IsZero()
if outsourcing && memberExists {
return sdkerrors.ErrInvalidRequest.Wrap("outsourcing policy not allows members")
Expand All @@ -97,7 +98,7 @@ func ValidateGenesis(data GenesisState) error {
if err := info.ValidateBasic(); err != nil {
return err
}
outsourcing := info.TotalWeight.IsZero()
var outsourcing bool = info.TotalWeight.IsZero()

if realWeight := sdk.NewDec(int64(len(data.Members))); !info.TotalWeight.Equal(realWeight) {
return sdkerrors.ErrInvalidRequest.Wrapf("total weight not match, %s != %s", info.TotalWeight, realWeight)
Expand Down

0 comments on commit ded8679

Please sign in to comment.