#[repr(C)]pub struct WoodConfig {
pub base_reward_rate: u64,
pub last_reset_at: i64,
pub min_difficulty: u64,
pub top_balance: u64,
pub total_epoch_rewards: u64,
}Expand description
Config is a singleton account which manages program coal minting variables.
Fields§
§base_reward_rate: u64The base reward rate paid out for a hash of minimum difficulty.
last_reset_at: i64The timestamp of the last reset.
min_difficulty: u64The minimum accepted difficulty.
top_balance: u64The largest known stake balance on the network from the last epoch.
total_epoch_rewards: u64The current epoch emission rate for the program.
Implementations§
Trait Implementations§
Source§impl AccountDeserialize for WoodConfig
impl AccountDeserialize for WoodConfig
fn try_from_bytes(data: &[u8]) -> Result<&Self, ProgramError>
fn try_from_bytes_mut(data: &mut [u8]) -> Result<&mut Self, ProgramError>
Source§impl Clone for WoodConfig
impl Clone for WoodConfig
Source§fn clone(&self) -> WoodConfig
fn clone(&self) -> WoodConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WoodConfig
impl Debug for WoodConfig
Source§impl Discriminator for WoodConfig
impl Discriminator for WoodConfig
fn discriminator() -> u8
Source§impl PartialEq for WoodConfig
impl PartialEq for WoodConfig
impl Copy for WoodConfig
impl Pod for WoodConfig
impl StructuralPartialEq for WoodConfig
Auto Trait Implementations§
impl Freeze for WoodConfig
impl RefUnwindSafe for WoodConfig
impl Send for WoodConfig
impl Sync for WoodConfig
impl Unpin for WoodConfig
impl UnwindSafe for WoodConfig
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