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-eips",
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
"eyre",
|
"eyre",
|
||||||
|
"libc",
|
||||||
"proptest",
|
"proptest",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"reth-fs-util",
|
"reth-fs-util",
|
||||||
|
|||||||
@ -181,18 +181,6 @@ pub mod rpc {
|
|||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
pub use reth_cli_runner::{tokio_runtime, CliContext, CliRunner};
|
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))]
|
#[cfg(all(feature = "jemalloc", unix))]
|
||||||
use tikv_jemallocator as _;
|
use tikv_jemallocator as _;
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@ fn main() {
|
|||||||
use reth::cli::Cli;
|
use reth::cli::Cli;
|
||||||
use reth_node_ethereum::EthereumNode;
|
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.
|
// Enable backtraces unless a RUST_BACKTRACE value has already been explicitly provided.
|
||||||
if std::env::var_os("RUST_BACKTRACE").is_none() {
|
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")]
|
#[cfg(feature = "optimism")]
|
||||||
fn main() {
|
fn main() {
|
||||||
reth::sigsegv_handler::install();
|
reth_cli_util::sigsegv_handler::install();
|
||||||
|
|
||||||
// Enable backtraces unless a RUST_BACKTRACE value has already been explicitly provided.
|
// Enable backtraces unless a RUST_BACKTRACE value has already been explicitly provided.
|
||||||
if std::env::var_os("RUST_BACKTRACE").is_none() {
|
if std::env::var_os("RUST_BACKTRACE").is_none() {
|
||||||
|
|||||||
@ -27,3 +27,6 @@ eyre.workspace = true
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
proptest.workspace = true
|
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.
|
/// Cli parsers functions.
|
||||||
pub mod parsers;
|
pub mod parsers;
|
||||||
pub use parsers::{hash_or_num_value_parser, parse_duration_from_secs, parse_socket_address};
|
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