Skip to main content

Module cli_shared

Module cli_shared 

Source

Re-exports§

pub use tikv_jemallocator;

Modules§

cli
logger
snapshot

Constants§

FOREST_DATA_DIR_ENV
Environment variable that overrides the Forest data directory, taking precedence over both the configuration file and the built-in default. Named after Lotus’ LOTUS_PATH to ease switching between implementations.

Functions§

chain_path
Gets chain data directory
data_dir_from_env 🔒
Returns the data directory set via the FOREST_DATA_DIR_ENV environment variable, if it is present and non-empty.
default_data_dir
Returns the effective Forest data directory: the FOREST_DATA_DIR_ENV environment variable if set, otherwise the built-in default. Unlike read_config, this does not consult a configuration file and is meant for contexts (e.g. the RPC client) that need the data directory without loading the full configuration.
default_token_path
Returns the path to the RPC admin token within the effective data directory (see default_data_dir). This is where a daemon started with the same environment saves the token, so clients can read it back from here.
read_config