Skip to content

Commit e5a8918

Browse files
0.1.10
1 parent 4ef5f06 commit e5a8918

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/peer_pool.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,7 @@ impl ChiaPeerPool {
347347
});
348348
}
349349

350-
async fn peer_worker(
351-
mut receiver: mpsc::Receiver<WorkerRequest>,
352-
params: PeerWorkerParams,
353-
) {
350+
async fn peer_worker(mut receiver: mpsc::Receiver<WorkerRequest>, params: PeerWorkerParams) {
354351
info!("Starting worker for peer {}", params.peer_id);
355352

356353
while let Some(request) = receiver.recv().await {
@@ -359,7 +356,10 @@ impl ChiaPeerPool {
359356
height,
360357
response_tx,
361358
} => {
362-
debug!("Worker {} fetching block at height {}", params.peer_id, height);
359+
debug!(
360+
"Worker {} fetching block at height {}",
361+
params.peer_id, height
362+
);
363363

364364
// Create a new connection for this request
365365
match params.peer_connection.connect().await {
@@ -371,7 +371,8 @@ impl ChiaPeerPool {
371371
continue;
372372
}
373373

374-
match params.peer_connection
374+
match params
375+
.peer_connection
375376
.request_block_by_height(height, &mut ws_stream)
376377
.await
377378
{
@@ -385,7 +386,9 @@ impl ChiaPeerPool {
385386

386387
// Update peak height for this peer if this is higher than what we've seen
387388
let mut guard = params.inner.write().await;
388-
if let Some(peer_info) = guard.peers.get_mut(&params.peer_id) {
389+
if let Some(peer_info) =
390+
guard.peers.get_mut(&params.peer_id)
391+
{
389392
match peer_info.peak_height {
390393
Some(current_peak) => {
391394
if parsed_block.height > current_peak {

0 commit comments

Comments
 (0)