fix(rpc): fix a bunch of clippy lints (#10493)
* fix(rpc): fix a bunch of clippy lints * fix(rpc clippy): remove unused ignored lints * fix(clippy): fix all redundant_field_names This commit fixes all uses of `redundant_field_names` and removes the ignored lint `redundant_field_names` * fix(brain unwrap): replace with expect
This commit is contained in:
committed by
Hernando Castano
parent
f2c34f7ca2
commit
17042e9c32
@@ -29,15 +29,10 @@ pub fn submit_work_detail<C: BlockChainClient, M: MinerService>(client: &Arc<C>,
|
||||
// TODO [ToDr] Should disallow submissions in case of PoA?
|
||||
trace!(target: "miner", "submit_work_detail: Decoded: nonce={}, pow_hash={}, mix_hash={}", nonce, pow_hash, mix_hash);
|
||||
let seal = vec![rlp::encode(&mix_hash), rlp::encode(&nonce)];
|
||||
let import = miner.submit_seal(pow_hash, seal)
|
||||
.and_then(|block| client.import_sealed_block(block));
|
||||
match import {
|
||||
Ok(hash) => {
|
||||
Ok(hash.into())
|
||||
},
|
||||
Err(err) => {
|
||||
warn!(target: "miner", "Cannot submit work - {:?}.", err);
|
||||
Err(errors::cannot_submit_work(err))
|
||||
},
|
||||
}
|
||||
miner.submit_seal(pow_hash, seal)
|
||||
.and_then(|block| client.import_sealed_block(block))
|
||||
.map_err(|e| {
|
||||
warn!(target: "miner", "Cannot submit work - {:?}.", e);
|
||||
errors::cannot_submit_work(e)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user