Refactor genesis download/load/check functions (#17276)
* Refactor genesis ingest functions * Consolidate genesis.bin/genesis.tar.bz2 references
This commit is contained in:
		| @@ -32,6 +32,10 @@ use std::{ | ||||
|     time::{SystemTime, UNIX_EPOCH}, | ||||
| }; | ||||
|  | ||||
| pub const DEFAULT_GENESIS_FILE: &str = "genesis.bin"; | ||||
| pub const DEFAULT_GENESIS_ARCHIVE: &str = "genesis.tar.bz2"; | ||||
| pub const DEFAULT_GENESIS_DOWNLOAD_PATH: &str = "/genesis.tar.bz2"; | ||||
|  | ||||
| // deprecated default that is no longer used | ||||
| pub const UNUSED_DEFAULT: u64 = 1024; | ||||
|  | ||||
| @@ -152,7 +156,7 @@ impl GenesisConfig { | ||||
|     } | ||||
|  | ||||
|     fn genesis_filename(ledger_path: &Path) -> PathBuf { | ||||
|         Path::new(ledger_path).join("genesis.bin") | ||||
|         Path::new(ledger_path).join(DEFAULT_GENESIS_FILE) | ||||
|     } | ||||
|  | ||||
|     pub fn load(ledger_path: &Path) -> Result<Self, std::io::Error> { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user