pub struct DecisionPolicyWindows {
pub voting_period: Option<Duration>,
pub min_execution_period: Option<Duration>,
}
Expand description
DecisionPolicyWindows defines the different windows for voting and execution.
Fields§
§voting_period: Option<Duration>
voting_period is the duration from submission of a proposal to the end of voting period Within this times votes can be submitted with MsgVote.
min_execution_period: Option<Duration>
min_execution_period is the minimum duration after the proposal submission
where members can start sending MsgExec. This means that the window for
sending a MsgExec transaction is:
[ submission + min_execution_period ; submission + voting_period + max_execution_period]
where max_execution_period is a app-specific config, defined in the keeper.
If not set, min_execution_period will default to 0.
Please make sure to set a min_execution_period
that is smaller than
voting_period + max_execution_period
, or else the above execution window
is empty, meaning that all proposals created with this decision policy
won’t be able to be executed.
Trait Implementations§
Source§impl Clone for DecisionPolicyWindows
impl Clone for DecisionPolicyWindows
Source§fn clone(&self) -> DecisionPolicyWindows
fn clone(&self) -> DecisionPolicyWindows
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DecisionPolicyWindows
impl Debug for DecisionPolicyWindows
Source§impl Default for DecisionPolicyWindows
impl Default for DecisionPolicyWindows
Source§impl Message for DecisionPolicyWindows
impl Message for DecisionPolicyWindows
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.Source§impl PartialEq for DecisionPolicyWindows
impl PartialEq for DecisionPolicyWindows
impl StructuralPartialEq for DecisionPolicyWindows
Auto Trait Implementations§
impl Freeze for DecisionPolicyWindows
impl RefUnwindSafe for DecisionPolicyWindows
impl Send for DecisionPolicyWindows
impl Sync for DecisionPolicyWindows
impl Unpin for DecisionPolicyWindows
impl UnwindSafe for DecisionPolicyWindows
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<M> NibiruProstMsg for Mwhere
M: Message,
impl<M> NibiruProstMsg for Mwhere
M: Message,
fn to_binary(&self) -> Binary
Source§fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg
fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg
Name.type_url()
function. This method attempts
to downcast the message to prost::Name, and if successful, constructs a
CosmosMsg::Stargate
object corresponding to the type.