eth_getwork implemented.
This commit is contained in:
@@ -172,7 +172,8 @@ fn get_data_size(block_number: u64) -> usize {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn get_seedhash(block_number: u64) -> H256 {
|
||||
/// Given the `block_number`, determine the seed hash for Ethash.
|
||||
pub fn get_seedhash(block_number: u64) -> H256 {
|
||||
let epochs = block_number / ETHASH_EPOCH_LENGTH;
|
||||
let mut ret: H256 = [0u8; 32];
|
||||
for _ in 0..epochs {
|
||||
|
||||
@@ -24,7 +24,7 @@ mod compute;
|
||||
|
||||
use std::mem;
|
||||
use compute::Light;
|
||||
pub use compute::{quick_get_difficulty, H256, ProofOfWork, ETHASH_EPOCH_LENGTH};
|
||||
pub use compute::{get_seedhash, quick_get_difficulty, H256, ProofOfWork, ETHASH_EPOCH_LENGTH};
|
||||
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
@@ -35,7 +35,7 @@ struct LightCache {
|
||||
prev: Option<Arc<Light>>,
|
||||
}
|
||||
|
||||
/// Lighy/Full cache manager
|
||||
/// Light/Full cache manager.
|
||||
pub struct EthashManager {
|
||||
cache: Mutex<LightCache>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user