#[repr(C)]pub struct Proof {
pub authority: Pubkey,
pub claimable_rewards: u64,
pub hash: Hash,
pub total_hashes: u64,
pub total_rewards: u64,
}
Expand description
Proof accounts track a miner’s current hash, claimable rewards, and lifetime stats. Every miner is allowed one proof account which is required by the program to mine or claim rewards.
Fields§
The account (i.e. miner) authorized to use this proof.
claimable_rewards: u64
The quantity of tokens this miner may claim from the treasury.
hash: Hash
The proof’s current hash.
total_hashes: u64
The total lifetime hashes provided by this miner.
total_rewards: u64
The total lifetime rewards distributed to this miner.
Implementations§
Trait Implementations§
Source§impl AccountDeserialize for Proof
impl AccountDeserialize for Proof
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 Proof
impl Discriminator for Proof
impl Copy for Proof
impl Pod for Proof
impl StructuralPartialEq for Proof
Auto Trait Implementations§
impl Freeze for Proof
impl RefUnwindSafe for Proof
impl Send for Proof
impl Sync for Proof
impl Unpin for Proof
impl UnwindSafe for Proof
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