Remove extraneous messages.

This commit is contained in:
Gav Wood 2016-06-29 19:19:45 +02:00 committed by arkpar
parent 93a89049ed
commit 6ca2e6b29b
2 changed files with 6 additions and 13 deletions

View File

@ -863,7 +863,6 @@ impl MiningBlockChainClient for Client {
self.miner.update_sealing(self); self.miner.update_sealing(self);
} }
info!("Block {} ({}) submitted and imported.", h.hex(), number);
Ok(h) Ok(h)
} }
} }

View File

@ -612,25 +612,19 @@ impl MinerService for Miner {
fn submit_seal(&self, chain: &MiningBlockChainClient, pow_hash: H256, seal: Vec<Bytes>) -> Result<(), Error> { fn submit_seal(&self, chain: &MiningBlockChainClient, pow_hash: H256, seal: Vec<Bytes>) -> Result<(), Error> {
let result = if let Some(b) = self.sealing_work.lock().unwrap().take_used_if(|b| &b.hash() == &pow_hash) { let result = if let Some(b) = self.sealing_work.lock().unwrap().take_used_if(|b| &b.hash() == &pow_hash) {
match b.lock().try_seal(self.engine(), seal) { b.lock().try_seal(self.engine(), seal).or_else(|_| {
Err(_) => { warn!(target: "miner", "Mined solution rejected: Invalid.");
info!(target: "miner", "Mined solution rejected: Invalid."); Err(Error::PowInvalid)
Err(Error::PowInvalid) })
}
Ok(sealed) => {
info!(target: "miner", "New solution received for #{}: {}", sealed.header().number(), sealed.header().hash());
Ok(sealed)
}
}
} else { } else {
info!(target: "miner", "Mined solution rejected: Block unknown or out of date."); warn!(target: "miner", "Mined solution rejected: Block unknown or out of date.");
Err(Error::PowHashInvalid) Err(Error::PowHashInvalid)
}; };
result.and_then(|sealed| { result.and_then(|sealed| {
let n = sealed.header().number(); let n = sealed.header().number();
let h = sealed.header().hash(); let h = sealed.header().hash();
try!(chain.import_sealed_block(sealed)); try!(chain.import_sealed_block(sealed));
info!("Mined block imported OK. #{}: {}", paint(White.bold(), format!("{}", n)), paint(White.bold(), h.hex())); info!(target: "miner", "Mined block imported OK. #{}: {}", paint(White.bold(), format!("{}", n)), paint(White.bold(), h.hex()));
Ok(()) Ok(())
}) })
} }