chore: bump fd-lock from 2.0.0 to 3.0.0 (#18756)
* chore: bump fd-lock from 2.0.0 to 3.0.0 Bumps [fd-lock](https://github.com/yoshuawuyts/fd-lock) from 2.0.0 to 3.0.0. - [Release notes](https://github.com/yoshuawuyts/fd-lock/releases) - [Commits](https://github.com/yoshuawuyts/fd-lock/commits) --- updated-dependencies: - dependency-name: fd-lock dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Use new api Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tyera Eulberg <tyera@solana.com>
This commit is contained in:
5
Cargo.lock
generated
5
Cargo.lock
generated
@ -1375,10 +1375,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fd-lock"
|
name = "fd-lock"
|
||||||
version = "2.0.0"
|
version = "3.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0010f02effd88c702318c5dde0463206be67495d0b4d906ba7c0a8f166cc7f06"
|
checksum = "b8806dd91a06a7a403a8e596f9bfbfb34e469efbc363fc9c9713e79e26472e36"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"cfg-if 1.0.0",
|
||||||
"libc",
|
"libc",
|
||||||
"winapi 0.3.8",
|
"winapi 0.3.8",
|
||||||
]
|
]
|
||||||
|
@ -17,7 +17,7 @@ chrono = { version = "0.4.11", features = ["serde"] }
|
|||||||
clap = "2.33.1"
|
clap = "2.33.1"
|
||||||
console = "0.14.1"
|
console = "0.14.1"
|
||||||
core_affinity = "0.5.10"
|
core_affinity = "0.5.10"
|
||||||
fd-lock = "2.0.0"
|
fd-lock = "3.0.0"
|
||||||
indicatif = "0.16.2"
|
indicatif = "0.16.2"
|
||||||
jsonrpc-core = "17.1.0"
|
jsonrpc-core = "17.1.0"
|
||||||
jsonrpc-core-client = { version = "17.1.0", features = ["ipc", "ws"] }
|
jsonrpc-core-client = { version = "17.1.0", features = ["ipc", "ws"] }
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
use {
|
use {
|
||||||
clap::{value_t, value_t_or_exit, App, Arg},
|
clap::{value_t, value_t_or_exit, App, Arg},
|
||||||
fd_lock::FdLock,
|
|
||||||
solana_clap_utils::{
|
solana_clap_utils::{
|
||||||
input_parsers::{pubkey_of, pubkeys_of, value_of},
|
input_parsers::{pubkey_of, pubkeys_of, value_of},
|
||||||
input_validators::{
|
input_validators::{
|
||||||
@ -402,8 +401,8 @@ fn main() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut ledger_fd_lock = FdLock::new(fs::File::open(&ledger_path).unwrap());
|
let mut ledger_fd_lock = fd_lock::RwLock::new(fs::File::open(&ledger_path).unwrap());
|
||||||
let _ledger_lock = ledger_fd_lock.try_lock().unwrap_or_else(|_| {
|
let _ledger_lock = ledger_fd_lock.try_write().unwrap_or_else(|_| {
|
||||||
println!(
|
println!(
|
||||||
"Error: Unable to lock {} directory. Check if another validator is running",
|
"Error: Unable to lock {} directory. Check if another validator is running",
|
||||||
ledger_path.display()
|
ledger_path.display()
|
||||||
|
@ -5,7 +5,6 @@ use {
|
|||||||
AppSettings, Arg, ArgMatches, SubCommand,
|
AppSettings, Arg, ArgMatches, SubCommand,
|
||||||
},
|
},
|
||||||
console::style,
|
console::style,
|
||||||
fd_lock::FdLock,
|
|
||||||
log::*,
|
log::*,
|
||||||
rand::{seq::SliceRandom, thread_rng, Rng},
|
rand::{seq::SliceRandom, thread_rng, Rng},
|
||||||
solana_clap_utils::{
|
solana_clap_utils::{
|
||||||
@ -2501,8 +2500,8 @@ pub fn main() {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
let mut ledger_fd_lock = FdLock::new(fs::File::open(&ledger_path).unwrap());
|
let mut ledger_fd_lock = fd_lock::RwLock::new(fs::File::open(&ledger_path).unwrap());
|
||||||
let _ledger_lock = ledger_fd_lock.try_lock().unwrap_or_else(|_| {
|
let _ledger_lock = ledger_fd_lock.try_write().unwrap_or_else(|_| {
|
||||||
println!(
|
println!(
|
||||||
"Error: Unable to lock {} directory. Check if another validator is running",
|
"Error: Unable to lock {} directory. Check if another validator is running",
|
||||||
ledger_path.display()
|
ledger_path.display()
|
||||||
|
Reference in New Issue
Block a user