Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix threads env var
  • Loading branch information
liamaharon committed Apr 27, 2023
commit c281138fd7337bc8946361e46a49b84468cda68b
4 changes: 2 additions & 2 deletions utils/frame/remote-externalities/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use sp_core::{
pub use sp_io::TestExternalities;
use sp_runtime::{traits::Block as BlockT, StateVersion};
use std::{
cmp::max,
cmp::{max, min},
fs,
num::NonZeroUsize,
ops::{Deref, DerefMut},
Expand Down Expand Up @@ -348,7 +348,7 @@ where
Err(_) => Self::DEFAULT_PARALLELISM,
};
assert!(requested > 0, "TRY_RUNTIME_MAX_THREADS must be greater than 0");
return NonZeroUsize::new(max(requested, avaliable))
return NonZeroUsize::new(min(requested, avaliable))
.expect("requested and avaliable are non-zero; qed")
}

Expand Down