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

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 After HardFork4, which obsoletes secondary PoW, this effectively becomes 4 more bytes of nonce. might be repurposed in future.

nonce: u64

Nonce increment used to mine this block.

proof: Proof

Proof of work data.

Implementations

Write the pre-hash portion of the header

Maximum difficulty this proof of work can achieve

Maximum unscaled difficulty this proof of work can achieve

The edge_bits used for the cuckoo cycle size on this proof

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Reads the data necessary to this Readable from the provided reader

Serialize this value into the given Serde serializer. Read more

Write the data held by this Writeable to the provided writer

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.