#[repr(C)]pub struct Config {
pub base_reward_rate: u64,
pub last_reset_at: i64,
pub min_difficulty: u64,
pub top_balance: u64,
pub evolver: Pubkey,
pub evolvable: u64,
}
Expand description
Config is a singleton account which manages program global variables.
Fields§
§base_reward_rate: u64
The base reward rate paid out for a hash of minimum difficulty.
last_reset_at: i64
The timestamp of the last reset.
min_difficulty: u64
The minimum accepted difficulty.
top_balance: u64
The largest known stake balance on the network from the last epoch.
evolver: Pubkey
The mars evolution authority with permission to update/change the evolver. The evolver decides the evolution fate of Mars
evolvable: u64
Is mars evolvable, i.e. from mars to marsh.
Implementations§
Trait Implementations§
Source§impl AccountDeserialize for Config
impl AccountDeserialize for Config
fn try_from_bytes(data: &[u8]) -> Result<&Self, ProgramError>
fn try_from_bytes_mut(data: &mut [u8]) -> Result<&mut Self, ProgramError>
Source§impl Discriminator for Config
impl Discriminator for Config
fn discriminator() -> u8
impl Copy for Config
impl Pod for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.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>
Converts
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>
Converts
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 more