Merge pull request #846 from ethcore/fixmining

Fix response for mining.
This commit is contained in:
Gav Wood 2016-03-28 12:43:05 +02:00
commit cd6a09c0df

View File

@ -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())