Skip to main content

SingleBlockSolver

Struct SingleBlockSolver 

Source
pub struct SingleBlockSolver { /* private fields */ }
Expand description

Safe decimal nonce single block solver.

Current implementation: generic sha2 crate fallback.

Trait Implementations§

Source§

impl From<SingleBlockMessage> for SingleBlockSolver

Source§

fn from(message: SingleBlockMessage) -> Self

Converts to this type from the input type.
Source§

impl From<SingleBlockSolver> for SingleBlockSolver

Source§

fn from(solver: SingleBlockSolver) -> Self

Converts to this type from the input type.
Source§

impl From<SingleBlockSolver> for SingleBlockSolver

Source§

fn from(solver: SingleBlockSolver) -> Self

Converts to this type from the input type.
Source§

impl Solver for SingleBlockSolver

Source§

fn set_limit(&mut self, limit: u64)

Set the limit.
Source§

fn get_attempted_nonces(&self) -> u64

Get the attempted nonces.
Source§

fn solve<const TYPE: u8>( &mut self, target: u64, mask: u64, ) -> Option<(u64, [u32; 8])>

Returns a valid nonce and its corresponding hash value. Read more
Source§

fn solve_nonce_only<const TYPE: u8>( &mut self, target: u64, mask: u64, ) -> Option<u64>

Returns a valid nonce without the actual hash. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<S> SolverDyn for S
where S: Solver,

Source§

fn solve_dyn( &mut self, target: u64, ty: u8, mask: u64, ) -> Option<(u64, [u32; 8])>

A dynamic dispatching wrapper for solve
Source§

fn solve_nonce_only_dyn( &mut self, target: u64, ty: u8, mask: u64, ) -> Option<u64>

A dynamic dispatching wrapper for solve_nonce_only
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.