Skip to content

Commit

Permalink
feat(node): store state for any # of networks
Browse files Browse the repository at this point in the history
Addresses kindelia#163

Previously chain state was stored under a path such as:

    ~/.kindelia/state/{blocks,heaps}

With this change, the data is stored at:

    ~/.kindelia/state/<network_id>/{blocks,heaps}

This enables for example flipping back and forth between a testnet
and mainnet just by changing network_id in the config, or even via
cli arg.
  • Loading branch information
dan-da committed Dec 3, 2022
1 parent e66cb0a commit 7ff77af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kindelia/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ pub fn run_cli() -> anyhow::Result<()> {

let network_id = resolve_cfg!(
env = "KINDELIA_NETWORK_ID",
prop = "node.network.network_id".to_string(),
prop = "node.network.network_id",
no_default = anyhow!("Missing `network_id` parameter."),
cli_val = network_id,
cfg = config,
Expand Down

0 comments on commit 7ff77af

Please sign in to comment.