mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 05:47:58 +00:00
Do not drop the task_manager for benchmarking stuff (#12147)
We can not drop the `task_manager` for benchmarking stuff, because otherwise stuff that may needs this feature (like background signature verification) will fail. Besides the base path setup is moved to `SharedParams` directly. Meaning any call to `base_path` will now directly return a tmp path when `--dev` is given.
This commit is contained in:
@@ -82,8 +82,13 @@ pub struct SharedParams {
|
||||
|
||||
impl SharedParams {
|
||||
/// Specify custom base path.
|
||||
pub fn base_path(&self) -> Option<BasePath> {
|
||||
self.base_path.clone().map(Into::into)
|
||||
pub fn base_path(&self) -> Result<Option<BasePath>, crate::Error> {
|
||||
match &self.base_path {
|
||||
Some(r) => Ok(Some(r.clone().into())),
|
||||
// If `dev` is enabled, we use the temp base path.
|
||||
None if self.is_dev() => Ok(Some(BasePath::new_temp_dir()?)),
|
||||
None => Ok(None),
|
||||
}
|
||||
}
|
||||
|
||||
/// Specify the development chain.
|
||||
|
||||
Reference in New Issue
Block a user