Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
th7nder committed Dec 31, 2024
1 parent 3fcdc12 commit 684e16c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
5 changes: 4 additions & 1 deletion storage-provider/server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ use subxt::{
},
tx::Signer,
};
use tokio::{sync::{mpsc::UnboundedReceiver, Semaphore}, task::JoinError};
use tokio::{
sync::{mpsc::UnboundedReceiver, Semaphore},
task::JoinError,
};
use tokio_util::sync::CancellationToken;
use tracing::level_filters::LevelFilter;
use tracing_subscriber::{fmt, layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
Expand Down
13 changes: 9 additions & 4 deletions storage-provider/server/src/pipeline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ use storagext::{
};
use subxt::{ext::codec::Encode, tx::Signer};
use tokio::{
sync::{mpsc::{error::SendError, UnboundedReceiver, UnboundedSender}, Semaphore},
sync::{
mpsc::{error::SendError, UnboundedReceiver, UnboundedSender},
Semaphore,
},
task::{JoinError, JoinHandle},
};
use tokio_util::{sync::CancellationToken, task::TaskTracker};
Expand Down Expand Up @@ -546,7 +549,11 @@ async fn prove_commit(
seal_randomness_height, sector.precommit_block, prove_commit_block, hex::encode(entropy), hex::encode(ticket), hex::encode(seed), hex::encode(prover_id), sector_number);

tracing::debug!("Acquiring sempahore...");
let permit = state.prove_commit_throttle.acquire().await.expect("semaphore to not be closed");
let permit = state
.prove_commit_throttle
.acquire()
.await
.expect("semaphore to not be closed");
tracing::debug!("Acquired sempahore.");

let sealing_handle: JoinHandle<Result<Vec<BlstrsProof>, _>> = {
Expand All @@ -555,7 +562,6 @@ async fn prove_commit(
let sealed_path = sector.sealed_path.clone();
let piece_infos = sector.piece_infos.clone();


tokio::task::spawn_blocking(move || {
sealer.prove_sector(
porep_params.as_ref(),
Expand Down Expand Up @@ -732,7 +738,6 @@ async fn submit_windowed_post(
})
.collect::<Vec<_>>();


tracing::info!("Wait for block {} for open deadline", deadline.start,);
state
.xt_client
Expand Down

0 comments on commit 684e16c

Please sign in to comment.