Skip to content

Commit

Permalink
feedback updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed Dec 6, 2024
1 parent 56a323b commit 8afffab
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion proto/zetachain/zetacore/observer/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ service Query {
// Queries operational flags
rpc OperationalFlags(QueryOperationalFlagsRequest)
returns (QueryOperationalFlagsResponse) {
option (google.api.http).get = "/zeta-chain/observer/opertaionalFlags";
option (google.api.http).get = "/zeta-chain/observer/operationalFlags";
}
}

Expand Down
6 changes: 0 additions & 6 deletions x/observer/client/cli/tx_update_operational_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package cli
import (
"encoding/json"
"os"
"path/filepath"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
Expand Down Expand Up @@ -31,11 +30,6 @@ func CmdUpdateOperationalFlags() *cobra.Command {
restartHeight, _ := flagSet.GetInt64("restart-height")

if file != "" {
file, err := filepath.Abs(file)
if err != nil {
return err
}
file = filepath.Clean(file)
input, err := os.ReadFile(file) // #nosec G304
if err != nil {
return err
Expand Down
5 changes: 5 additions & 0 deletions x/observer/types/message_update_operational_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,10 @@ func (msg *MsgUpdateOperationalFlags) ValidateBasic() error {
if _, err := sdk.AccAddressFromBech32(msg.Creator); err != nil {
return cosmoserrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err)
}

Check warning on line 46 in x/observer/types/message_update_operational_flags.go

View check run for this annotation

Codecov / codecov/patch

x/observer/types/message_update_operational_flags.go#L43-L46

Added lines #L43 - L46 were not covered by tests

if msg.OperationalFlags.RestartHeight < 0 {
return cosmoserrors.Wrap(sdkerrors.ErrInvalidRequest, "restart height cannot be negative")
}

Check warning on line 50 in x/observer/types/message_update_operational_flags.go

View check run for this annotation

Codecov / codecov/patch

x/observer/types/message_update_operational_flags.go#L48-L50

Added lines #L48 - L50 were not covered by tests

return nil

Check warning on line 52 in x/observer/types/message_update_operational_flags.go

View check run for this annotation

Codecov / codecov/patch

x/observer/types/message_update_operational_flags.go#L52

Added line #L52 was not covered by tests
}
14 changes: 7 additions & 7 deletions x/observer/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x/observer/types/query.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8afffab

Please sign in to comment.