Merge pull request #846 from ethcore/fixmining
Fix response for mining.
This commit is contained in:
commit
cd6a09c0df
@ -428,8 +428,8 @@ impl<C, S, A, M, EM> Eth for EthClient<C, S, A, M, EM>
|
||||
miner.map_sealing_work(client.deref(), |b| {
|
||||
let pow_hash = b.hash();
|
||||
let target = Ethash::difficulty_to_boundary(b.block().header().difficulty());
|
||||
let seed_hash = self.seed_compute.lock().unwrap().get_seedhash(b.block().header().number());
|
||||
to_value(&(pow_hash, seed_hash, target))
|
||||
let seed_hash = &self.seed_compute.lock().unwrap().get_seedhash(b.block().header().number());
|
||||
to_value(&(pow_hash, H256::from_slice(&seed_hash[..]), target))
|
||||
}).unwrap_or(Err(Error::internal_error())) // no work found.
|
||||
},
|
||||
_ => Err(Error::invalid_params())
|
||||
|
Loading…
Reference in New Issue
Block a user