[−][src]Struct grin_core::pow::ProofOfWork
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.
Implementations
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 Clone for ProofOfWork
[src]
fn clone(&self) -> ProofOfWork
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ProofOfWork
[src]
impl Default for ProofOfWork
[src]
fn default() -> ProofOfWork
[src]
impl PartialEq<ProofOfWork> for ProofOfWork
[src]
fn eq(&self, other: &ProofOfWork) -> bool
[src]
fn ne(&self, other: &ProofOfWork) -> bool
[src]
impl Readable for ProofOfWork
[src]
impl Serialize for ProofOfWork
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for ProofOfWork
[src]
impl Writeable for ProofOfWork
[src]
Auto Trait Implementations
impl RefUnwindSafe for ProofOfWork
impl Send for ProofOfWork
impl Sync for ProofOfWork
impl Unpin for ProofOfWork
impl UnwindSafe for ProofOfWork
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Sync + Send> where
T: Send + Sync,
T: Send + Sync,
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,