#[repr(C)]pub struct Proof {
pub authority: Pubkey,
pub balance: u64,
pub challenge: [u8; 32],
pub last_hash: [u8; 32],
pub last_hash_at: i64,
pub last_stake_at: i64,
pub miner: Pubkey,
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 signer authorized to use this proof.
balance: u64
The quantity of tokens this miner has staked or earned.
challenge: [u8; 32]
The current mining challenge.
last_hash: [u8; 32]
The last hash the miner provided.
last_hash_at: i64
The last time this account provided a hash.
last_stake_at: i64
The last time stake was deposited into this account.
miner: Pubkey
The keypair which has permission to submit hashes for mining.
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
fn discriminator() -> u8
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