Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
nicopernas committed Aug 1, 2023
1 parent 16ab635 commit 51c0aff
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ func (app *BaseApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.Respons
Height: req.Height,
Time: req.Time,
Hash: req.Hash,
AppHash: app.LastCommitID().Hash,
// AppHash: app.LastCommitID().Hash,
}).
WithConsensusParams(app.GetConsensusParams(app.finalizeBlockState.ctx)).
WithVoteInfos(req.DecidedLastCommit.Votes).
Expand Down
20 changes: 10 additions & 10 deletions client/v2/autocli/flag/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func (b *Builder) addMessageFlags(ctx context.Context, flagSet *pflag.FlagSet, m
return nil, fmt.Errorf("can't find field %s on %s", arg.ProtoField, messageType.Descriptor().FullName())
}

if arg.Optional && arg.Varargs {
return nil, fmt.Errorf("positional argument %s can't be both optional and varargs", arg.ProtoField)
}
//if arg.Optional && arg.Varargs {
// return nil, fmt.Errorf("positional argument %s can't be both optional and varargs", arg.ProtoField)
//}

if arg.Varargs {
if i != n-1 {
Expand All @@ -49,13 +49,13 @@ func (b *Builder) addMessageFlags(ctx context.Context, flagSet *pflag.FlagSet, m
hasVarargs = true
}

if arg.Optional {
if i != n-1 {
return nil, fmt.Errorf("optional positional argument %s must be the last argument", arg.ProtoField)
}

hasOptional = true
}
//if arg.Optional {
// if i != n-1 {
// return nil, fmt.Errorf("optional positional argument %s must be the last argument", arg.ProtoField)
// }
//
// hasOptional = true
//}

_, hasValue, err := b.addFieldFlag(
ctx,
Expand Down
2 changes: 1 addition & 1 deletion server/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func CreateSDKLogger(ctx *Context, out io.Writer) (log.Logger, error) {
}

// Check if the CometBFT flag for trace logging is set and enable stack traces if so.
opts = append(opts, log.TraceOption(ctx.Viper.GetBool("trace"))) // cmtcli.TraceFlag
//opts = append(opts, log.TraceOption(ctx.Viper.GetBool("trace"))) // cmtcli.TraceFlag

return log.NewLogger(out, opts...), nil
}
Expand Down
2 changes: 1 addition & 1 deletion x/authz/module/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "granter"},
{ProtoField: "grantee"},
{ProtoField: "msg_type_url", Optional: true},
{ProtoField: "msg_type_url"},
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion x/gov/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
Short: "Query the parameters of the governance process",
Long: "Query the parameters of the governance process. Specify specific param types (voting|tallying|deposit) to filter results.",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "params_type", Optional: true},
{ProtoField: "params_type"},
},
},
{
Expand Down
10 changes: 5 additions & 5 deletions x/gov/keeper/vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ func (keeper Keeper) AddVote(ctx context.Context, proposalID uint64, voterAddr s

// deleteVotes deletes all the votes from a given proposalID.
func (keeper Keeper) deleteVotes(ctx context.Context, proposalID uint64) error {
rng := collections.NewPrefixedPairRange[uint64, sdk.AccAddress](proposalID)
err := keeper.Votes.Clear(ctx, rng)
if err != nil {
return err
}
//rng := collections.NewPrefixedPairRange[uint64, sdk.AccAddress](proposalID)
//err := keeper.Votes.Clear(ctx, rng)
//if err != nil {
// return err
//}

return nil
}
2 changes: 1 addition & 1 deletion x/upgrade/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
Short: "Query the list of module versions",
Long: "Gets a list of module names and their respective consensus versions. Following the command with a specific module name will return only that module's information.",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "module_name", Optional: true},
{ProtoField: "module_name" /*, Optional: true*/},
},
},
{
Expand Down

0 comments on commit 51c0aff

Please sign in to comment.