mirror of
https://github.com/mimblewimble/grin.git
synced 2025-05-01 14:51:14 +03:00
Issue 458 too verbose slog lines initial sync (#459)
* Alleviate slog-async channel overflow by shortening while clarifying some log lines. * add debug logging to GetBlock handling * make another log line less rendudantly chatty
This commit is contained in:
parent
8b81a2f806
commit
a4729b51ac
4 changed files with 7 additions and 5 deletions
|
@ -300,7 +300,7 @@ fn connect_and_req(
|
|||
let fut = connect_peer.then(move |p| {
|
||||
match p {
|
||||
Ok(Some(p)) => {
|
||||
debug!(LOGGER, "connect_and_req: ok, will attempt send_peer_request");
|
||||
debug!(LOGGER, "connect_and_req: ok. attempting send_peer_request");
|
||||
if let Ok(p) = p.try_read() {
|
||||
let _ = p.send_peer_request(capab);
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ fn connect_and_req(
|
|||
debug!(LOGGER, "connect_and_req: ok but none inner (what does this mean?), {}", addr);
|
||||
},
|
||||
Err(e) => {
|
||||
debug!(LOGGER, "connect_and_req: err - {:?}, {}, flagging as defunct", e, addr);
|
||||
debug!(LOGGER, "connect_and_req: {} is Defunct; {:?}", addr, e);
|
||||
let _ = p2p_server.update_state(addr, p2p::State::Defunct);
|
||||
},
|
||||
}
|
||||
|
|
|
@ -167,6 +167,8 @@ fn handle_payload(
|
|||
}
|
||||
Type::GetBlock => {
|
||||
let h = ser::deserialize::<Hash>(&mut &buf[..])?;
|
||||
debug!(LOGGER, "handle_payload: GetBlock {}", h);
|
||||
|
||||
let bo = adapter.get_block(h);
|
||||
if let Some(b) = bo {
|
||||
// serialize and send the block over
|
||||
|
|
|
@ -529,11 +529,11 @@ fn with_timeout<T: 'static>(
|
|||
Ok(inner)
|
||||
},
|
||||
Ok((Err(inner), _accept)) => {
|
||||
debug!(LOGGER, "with_timeout: ok but nested - {:?} (treating this as timeout)", inner);
|
||||
debug!(LOGGER, "with_timeout: ok, timeout. nested={:?}", inner);
|
||||
Err(Error::Timeout)
|
||||
},
|
||||
Err((e, _other)) => {
|
||||
debug!(LOGGER, "with_timeout: err - {:?} (treating this as an error)", e);
|
||||
debug!(LOGGER, "with_timeout: err. {:?}", e);
|
||||
Err(e)
|
||||
},
|
||||
});
|
||||
|
|
|
@ -96,7 +96,7 @@ impl PeerStore {
|
|||
}
|
||||
|
||||
pub fn save_peer(&self, p: &PeerData) -> Result<(), Error> {
|
||||
debug!(LOGGER, "saving peer to store {:?}", p);
|
||||
debug!(LOGGER, "save_peer: {:?} marked {:?}", p.addr, p.flags);
|
||||
|
||||
self.db.put_ser(&peer_key(p.addr)[..], p)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue