[][src]Struct grin_core::pow::ProofOfWork

pub struct ProofOfWork {
    pub total_difficulty: Difficulty,
    pub secondary_scaling: u32,
    pub nonce: u64,
    pub proof: Proof,
}

Block header information pertaining to the proof of work

Fields

total_difficulty: Difficulty

Total accumulated difficulty since genesis block

secondary_scaling: u32

Variable difficulty scaling factor fo secondary proof of work

nonce: u64

Nonce increment used to mine this block.

proof: Proof

Proof of work data.

Methods

impl ProofOfWork[src]

pub fn write_pre_pow<W: Writer>(&self, writer: &mut W) -> Result<(), Error>[src]

Write the pre-hash portion of the header

pub fn to_difficulty(&self, height: u64) -> Difficulty[src]

Maximum difficulty this proof of work can achieve

pub fn edge_bits(&self) -> u8[src]

The edge_bits used for the cuckoo cycle size on this proof

pub fn is_primary(&self) -> bool[src]

Whether this proof of work is for the primary algorithm (as opposed to secondary). Only depends on the edge_bits at this time.

pub fn is_secondary(&self) -> bool[src]

Whether this proof of work is for the secondary algorithm (as opposed to primary). Only depends on the edge_bits at this time.

Trait Implementations

impl Writeable for ProofOfWork[src]

impl Readable for ProofOfWork[src]

impl PartialEq<ProofOfWork> for ProofOfWork[src]

impl Default for ProofOfWork[src]

impl Clone for ProofOfWork[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for ProofOfWork[src]

impl Serialize for ProofOfWork[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> UnsafeAny for T where
    T: Any

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T