mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 22:57:59 -05:00
explorerd: add support for multiple networks (localnet, testnet, mainnet)
This update adds configuration support for multiple networks (localnet, testnet, and mainnet) to the explorer daemon, enabling provisioning of tailored instances for development, testing, and production environments. Summary of Updates: - Added `--network` argument to the binary crate args for specifying networks (localnet, testnet, and mainnet) - Implemented a `config` module for configuration management - Introduced `ExplorerConfig` and `ExplorerNetworkConfig` structures to model and work with the complete configuration file programmatically in Rust - Implemented `TryFrom` traits for configuration conversions - Added tests for configuration loading and network selection logic, which also validate the `explorerd_config.toml` configuration file - Updated the `explorer_config.toml` file to define initial configurations for localnet, testnet, and mainnet - Renamed the configuration key `db_path` to `database` for consistency across the project - Added toml dependency to Cargo.toml - Removed unused drk dependency from Cargo.toml - Added rpc to feature list for darkfi dependency
This commit is contained in:
@@ -9,10 +9,9 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
# Darkfi
|
||||
darkfi = {path = "../../../", features = ["async-daemonize", "validator"]}
|
||||
darkfi = {path = "../../../", features = ["async-daemonize", "validator", "rpc"]}
|
||||
darkfi-sdk = {path = "../../../src/sdk"}
|
||||
darkfi-serial = "0.4.2"
|
||||
drk = {path = "../../../bin/drk"}
|
||||
|
||||
# JSON-RPC
|
||||
async-trait = "0.1.86"
|
||||
@@ -38,6 +37,7 @@ sled-overlay = "0.1.6"
|
||||
log = "0.4.25"
|
||||
lazy_static = "1.5.0"
|
||||
tar = "0.4.43"
|
||||
toml = "0.8.20"
|
||||
|
||||
# Testing
|
||||
tempdir = "0.3.7"
|
||||
|
||||
Reference in New Issue
Block a user