mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: move sigsegv handler to reth-cli-util crate (#9421)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6674,6 +6674,7 @@ dependencies = [
|
||||
"alloy-eips",
|
||||
"alloy-primitives",
|
||||
"eyre",
|
||||
"libc",
|
||||
"proptest",
|
||||
"rand 0.8.5",
|
||||
"reth-fs-util",
|
||||
|
||||
@ -181,18 +181,6 @@ pub mod rpc {
|
||||
#[doc(inline)]
|
||||
pub use reth_cli_runner::{tokio_runtime, CliContext, CliRunner};
|
||||
|
||||
#[cfg(all(unix, any(target_env = "gnu", target_os = "macos")))]
|
||||
pub mod sigsegv_handler;
|
||||
|
||||
/// Signal handler to extract a backtrace from stack overflow.
|
||||
///
|
||||
/// This is a no-op because this platform doesn't support our signal handler's requirements.
|
||||
#[cfg(not(all(unix, any(target_env = "gnu", target_os = "macos"))))]
|
||||
pub mod sigsegv_handler {
|
||||
/// No-op function.
|
||||
pub fn install() {}
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "jemalloc", unix))]
|
||||
use tikv_jemallocator as _;
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ fn main() {
|
||||
use reth::cli::Cli;
|
||||
use reth_node_ethereum::EthereumNode;
|
||||
|
||||
reth::sigsegv_handler::install();
|
||||
reth_cli_util::sigsegv_handler::install();
|
||||
|
||||
// Enable backtraces unless a RUST_BACKTRACE value has already been explicitly provided.
|
||||
if std::env::var_os("RUST_BACKTRACE").is_none() {
|
||||
|
||||
@ -15,7 +15,7 @@ compile_error!("Cannot build the `op-reth` binary with the `optimism` feature fl
|
||||
|
||||
#[cfg(feature = "optimism")]
|
||||
fn main() {
|
||||
reth::sigsegv_handler::install();
|
||||
reth_cli_util::sigsegv_handler::install();
|
||||
|
||||
// Enable backtraces unless a RUST_BACKTRACE value has already been explicitly provided.
|
||||
if std::env::var_os("RUST_BACKTRACE").is_none() {
|
||||
|
||||
@ -27,3 +27,6 @@ eyre.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
proptest.workspace = true
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
libc = "0.2"
|
||||
|
||||
@ -15,3 +15,15 @@ pub use load_secret_key::get_secret_key;
|
||||
/// Cli parsers functions.
|
||||
pub mod parsers;
|
||||
pub use parsers::{hash_or_num_value_parser, parse_duration_from_secs, parse_socket_address};
|
||||
|
||||
#[cfg(all(unix, any(target_env = "gnu", target_os = "macos")))]
|
||||
pub mod sigsegv_handler;
|
||||
|
||||
/// Signal handler to extract a backtrace from stack overflow.
|
||||
///
|
||||
/// This is a no-op because this platform doesn't support our signal handler's requirements.
|
||||
#[cfg(not(all(unix, any(target_env = "gnu", target_os = "macos"))))]
|
||||
pub mod sigsegv_handler {
|
||||
/// No-op function.
|
||||
pub fn install() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user