@@ -347,10 +347,7 @@ impl ChiaPeerPool {
347
347
} ) ;
348
348
}
349
349
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 ) {
354
351
info ! ( "Starting worker for peer {}" , params. peer_id) ;
355
352
356
353
while let Some ( request) = receiver. recv ( ) . await {
@@ -359,7 +356,10 @@ impl ChiaPeerPool {
359
356
height,
360
357
response_tx,
361
358
} => {
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
+ ) ;
363
363
364
364
// Create a new connection for this request
365
365
match params. peer_connection . connect ( ) . await {
@@ -371,7 +371,8 @@ impl ChiaPeerPool {
371
371
continue ;
372
372
}
373
373
374
- match params. peer_connection
374
+ match params
375
+ . peer_connection
375
376
. request_block_by_height ( height, & mut ws_stream)
376
377
. await
377
378
{
@@ -385,7 +386,9 @@ impl ChiaPeerPool {
385
386
386
387
// Update peak height for this peer if this is higher than what we've seen
387
388
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
+ {
389
392
match peer_info. peak_height {
390
393
Some ( current_peak) => {
391
394
if parsed_block. height > current_peak {
0 commit comments