Struct ethash::EthashManager
source · [−]pub struct EthashManager { /* private fields */ }
Expand description
Light/Full cache manager.
Implementations
sourceimpl EthashManager
impl EthashManager
sourcepub fn new<T: Into<Option<OptimizeFor>>>(
cache_dir: &Path,
optimize_for: T,
progpow_transition: u64
) -> EthashManager
pub fn new<T: Into<Option<OptimizeFor>>>(
cache_dir: &Path,
optimize_for: T,
progpow_transition: u64
) -> EthashManager
Create a new new instance of ethash manager
sourcepub fn compute_light(
&self,
block_number: u64,
header_hash: &[u8; 32],
nonce: u64
) -> ProofOfWork
pub fn compute_light(
&self,
block_number: u64,
header_hash: &[u8; 32],
nonce: u64
) -> ProofOfWork
Calculate the light client data
block_number
- Block number to check
light
- The light client handler
header_hash
- The header hash to pack into the mix
nonce
- The nonce to pack into the mix
Auto Trait Implementations
impl !RefUnwindSafe for EthashManager
impl Send for EthashManager
impl Sync for EthashManager
impl Unpin for EthashManager
impl !UnwindSafe for EthashManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more