Skip to content

Commit fe69edb

Browse files
committed
Merge remote-tracking branch 'michael/rayon-signing' into attestation-batch-new
2 parents 4ea23ee + e41b611 commit fe69edb

File tree

1 file changed

+5
-7
lines changed
  • validator_client/signing_method/src

1 file changed

+5
-7
lines changed

validator_client/signing_method/src/lib.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use parking_lot::Mutex;
1010
use reqwest::{Client, header::ACCEPT};
1111
use std::path::PathBuf;
1212
use std::sync::Arc;
13-
use task_executor::TaskExecutor;
13+
use task_executor::{RayonPoolType, TaskExecutor};
1414
use tracing::instrument;
1515
use types::*;
1616
use url::Url;
@@ -182,13 +182,11 @@ impl SigningMethod {
182182
// Spawn a blocking task to produce the signature. This avoids blocking the core
183183
// tokio executor.
184184
let signature = executor
185-
.spawn_blocking_handle(
186-
move || voting_keypair.sk.sign(signing_root),
187-
"local_keystore_signer",
188-
)
189-
.ok_or(Error::ShuttingDown)?
185+
.spawn_blocking_with_rayon_async(RayonPoolType::HighPriority, move || {
186+
voting_keypair.sk.sign(signing_root)
187+
})
190188
.await
191-
.map_err(|e| Error::TokioJoin(e.to_string()))?;
189+
.map_err(|_| Error::ShuttingDown)?;
192190
Ok(signature)
193191
}
194192
SigningMethod::Web3Signer {

0 commit comments

Comments
 (0)