Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/cargo/secp256k1-0.28.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr authored Nov 17, 2023
2 parents 00a0b1e + 079b14f commit 08819b6
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 19 deletions.
13 changes: 7 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub type CurrencyTransactor = CurrencyAdapter<
(),
>;

/// `AssetId`/`Balance` converter for `PoolAssets`.
/// `AssetId`/`Balance` converter for `TrustBackedAssets`.
pub type TrustBackedAssetsConvertedConcreteId =
assets_common::TrustBackedAssetsConvertedConcreteId<TrustBackedAssetsPalletLocation, Balance>;

Expand All @@ -130,7 +130,7 @@ pub type FungiblesTransactor = FungiblesAdapter<
CheckingAccount,
>;

/// `AssetId/Balance` converter for `TrustBackedAssets`
/// `AssetId`/`Balance` converter for `ForeignAssets`.
pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConvertedConcreteId<
(
// Ignore `TrustBackedAssets` explicitly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub type CurrencyTransactor = CurrencyAdapter<
(),
>;

/// `AssetId/Balance` converter for `TrustBackedAssets`
/// `AssetId`/`Balance` converter for `TrustBackedAssets`.
pub type TrustBackedAssetsConvertedConcreteId =
assets_common::TrustBackedAssetsConvertedConcreteId<TrustBackedAssetsPalletLocation, Balance>;

Expand All @@ -130,7 +130,7 @@ pub type FungiblesTransactor = FungiblesAdapter<
CheckingAccount,
>;

/// `AssetId/Balance` converter for `TrustBackedAssets`
/// `AssetId`/`Balance` converter for `ForeignAssets`.
pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConvertedConcreteId<
(
// Ignore `TrustBackedAssets` explicitly
Expand Down
2 changes: 1 addition & 1 deletion substrate/client/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
array-bytes = "6.1"
chrono = "0.4.27"
clap = { version = "4.4.6", features = ["derive", "string", "wrap_help"] }
fdlimit = "0.2.1"
fdlimit = "0.3.0"
futures = "0.3.21"
itertools = "0.10.3"
libp2p-identity = { version = "0.1.3", features = ["peerid", "ed25519"]}
Expand Down
23 changes: 17 additions & 6 deletions substrate/client/cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,14 +605,25 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized {

logger.init()?;

if let Some(new_limit) = fdlimit::raise_fd_limit() {
if new_limit < RECOMMENDED_OPEN_FILE_DESCRIPTOR_LIMIT {
match fdlimit::raise_fd_limit() {
Ok(fdlimit::Outcome::LimitRaised { to, .. }) =>
if to < RECOMMENDED_OPEN_FILE_DESCRIPTOR_LIMIT {
warn!(
"Low open file descriptor limit configured for the process. \
Current value: {:?}, recommended value: {:?}.",
to, RECOMMENDED_OPEN_FILE_DESCRIPTOR_LIMIT,
);
},
Ok(fdlimit::Outcome::Unsupported) => {
// Unsupported platform (non-Linux)
},
Err(error) => {
warn!(
"Low open file descriptor limit configured for the process. \
Current value: {:?}, recommended value: {:?}.",
new_limit, RECOMMENDED_OPEN_FILE_DESCRIPTOR_LIMIT,
"Failed to configure file descriptor limit for the process: \
{}, recommended value: {:?}.",
error, RECOMMENDED_OPEN_FILE_DESCRIPTOR_LIMIT,
);
}
},
}

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion substrate/client/service/test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
async-channel = "1.8.0"
array-bytes = "6.1"
fdlimit = "0.2.1"
fdlimit = "0.3.0"
futures = "0.3.21"
log = "0.4.17"
parity-scale-codec = "3.6.1"
Expand Down
2 changes: 1 addition & 1 deletion substrate/client/service/test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ where
base_port: u16,
) -> TestNet<G, E, F, U> {
sp_tracing::try_init_simple();
fdlimit::raise_fd_limit();
fdlimit::raise_fd_limit().unwrap();
let runtime = Runtime::new().expect("Error creating tokio runtime");
let mut net = TestNet {
runtime,
Expand Down

0 comments on commit 08819b6

Please sign in to comment.