Skip to content

Commit

Permalink
DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
romanz committed Nov 20, 2023
1 parent bbfec83 commit 36c3828
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/p2p.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,14 @@ impl Connection {
let func = &func;
let blocks_duration = &self.blocks_duration;
let send = send.clone();
debug!("spawning task for {}", hash);
s.spawn(move |_| {
debug!("processing {}", hash);
let r = blocks_duration.observe_duration("process", || func(hash, block));
let _ = send.send(r);
});
}
debug!("waiting for {} blocks", blockhashes_len);
let result: Result<Vec<_>, std::sync::mpsc::RecvError> =
(0..blockhashes_len).map(|_| receive.recv()).collect();

Expand Down

0 comments on commit 36c3828

Please sign in to comment.