Skip to content

Commit

Permalink
Fix Validators name collision in cosmos.staking.v1beta1.rs
Browse files Browse the repository at this point in the history
In v0.43.* the staking module introduced authz.proto, which has
an enum (oneof validators) and a struct (message Validators) both
defined under message StakeAuthorization. When this struct runs through
prost it creates a namespace conflict. This commit simply renames
those conflicts. Since this StakeAuthorization is new to cosmos-rust
no downstream issues should ocurr.
  • Loading branch information
ChristianBorst committed Oct 7, 2021
1 parent 5936e62 commit af39fcf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cosmos-sdk-proto/src/prost/cosmos.staking.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1111,27 +1111,27 @@ pub struct StakeAuthorization {
#[prost(enumeration = "AuthorizationType", tag = "4")]
pub authorization_type: i32,
/// validators is the oneof that represents either allow_list or deny_list
#[prost(oneof = "stake_authorization::Validators", tags = "2, 3")]
pub validators: ::core::option::Option<stake_authorization::Validators>,
#[prost(oneof = "stake_authorization::IsStakeAuthorizationValidators", tags = "2, 3")]
pub validators: ::core::option::Option<stake_authorization::IsStakeAuthorizationValidators>,
}
/// Nested message and enum types in `StakeAuthorization`.
pub mod stake_authorization {
/// Validators defines list of validator addresses.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Validators {
pub struct StakeAuthorizationValidators {
#[prost(string, repeated, tag = "1")]
pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// validators is the oneof that represents either allow_list or deny_list
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Validators {
pub enum IsStakeAuthorizationValidators {
/// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
/// account.
#[prost(message, tag = "2")]
AllowList(Validators),
AllowList(StakeAuthorizationValidators),
/// deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
#[prost(message, tag = "3")]
DenyList(Validators),
DenyList(StakeAuthorizationValidators),
}
}
/// AuthorizationType defines the type of staking module authorization type
Expand Down

0 comments on commit af39fcf

Please sign in to comment.