Module Viper Removal (#6604)
* Remove viper * Remove viper * Remove viper * Skip TestCLIValidateGenesis * remove cruft leftover Co-authored-by: Alessio Treglia <alessio@tendermint.com>
This commit is contained in:
co-authored by
Alessio Treglia
parent
437b035160
commit
51df2f2033
@@ -6,7 +6,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
@@ -105,7 +104,8 @@ $ %s tx distribution withdraw-rewards cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fx
|
||||
}
|
||||
|
||||
msgs := []sdk.Msg{types.NewMsgWithdrawDelegatorReward(delAddr, valAddr)}
|
||||
if viper.GetBool(flagCommission) {
|
||||
|
||||
if commission, _ := cmd.Flags().GetBool(flagCommission); commission {
|
||||
msgs = append(msgs, types.NewMsgWithdrawValidatorCommission(valAddr))
|
||||
}
|
||||
|
||||
@@ -118,6 +118,7 @@ $ %s tx distribution withdraw-rewards cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fx
|
||||
return tx.GenerateOrBroadcastTx(clientCtx, msgs...)
|
||||
},
|
||||
}
|
||||
|
||||
cmd.Flags().Bool(flagCommission, false, "also withdraw validator's commission")
|
||||
return cmd
|
||||
}
|
||||
@@ -152,7 +153,7 @@ $ %s tx distribution withdraw-all-rewards --from mykey
|
||||
return err
|
||||
}
|
||||
|
||||
chunkSize := viper.GetInt(flagMaxMessagesPerTx)
|
||||
chunkSize, _ := cmd.Flags().GetInt(flagMaxMessagesPerTx)
|
||||
return newSplitAndApply(tx.GenerateOrBroadcastTx, clientCtx, msgs, chunkSize)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user