Fix response for mining.
This commit is contained in:
parent
c20ca0fa4e
commit
6a7c25e2be
@ -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| {
|
miner.map_sealing_work(client.deref(), |b| {
|
||||||
let pow_hash = b.hash();
|
let pow_hash = b.hash();
|
||||||
let target = Ethash::difficulty_to_boundary(b.block().header().difficulty());
|
let target = Ethash::difficulty_to_boundary(b.block().header().difficulty());
|
||||||
let seed_hash = self.seed_compute.lock().unwrap().get_seedhash(b.block().header().number());
|
let seed_hash = &self.seed_compute.lock().unwrap().get_seedhash(b.block().header().number());
|
||||||
to_value(&(pow_hash, seed_hash, target))
|
to_value(&(pow_hash, H256::from_slice(&seed_hash[..]), target))
|
||||||
}).unwrap_or(Err(Error::internal_error())) // no work found.
|
}).unwrap_or(Err(Error::internal_error())) // no work found.
|
||||||
},
|
},
|
||||||
_ => Err(Error::invalid_params())
|
_ => Err(Error::invalid_params())
|
||||||
|
Loading…
Reference in New Issue
Block a user