|
@@ -94,6 +94,10 @@ struct Args {
|
|
|
/// Replay logs (DB) path
|
|
/// Replay logs (DB) path
|
|
|
replay_datastore: String,
|
|
replay_datastore: String,
|
|
|
|
|
|
|
|
|
|
+ /// Flag to store Sled DB instructions
|
|
|
|
|
+ #[structopt(long)]
|
|
|
|
|
+ replay_mode: bool,
|
|
|
|
|
+
|
|
|
/// Generate a new NaCl keypair and exit
|
|
/// Generate a new NaCl keypair and exit
|
|
|
#[structopt(long)]
|
|
#[structopt(long)]
|
|
|
gen_chacha_keypair: bool,
|
|
gen_chacha_keypair: bool,
|
|
@@ -126,10 +130,6 @@ struct Args {
|
|
|
#[structopt(long)]
|
|
#[structopt(long)]
|
|
|
encrypt_password: bool,
|
|
encrypt_password: bool,
|
|
|
|
|
|
|
|
- /// replay_mode
|
|
|
|
|
- #[structopt(long)]
|
|
|
|
|
- replay_mode: bool,
|
|
|
|
|
-
|
|
|
|
|
/// P2P network settings
|
|
/// P2P network settings
|
|
|
#[structopt(flatten)]
|
|
#[structopt(flatten)]
|
|
|
net: SettingsOpt,
|
|
net: SettingsOpt,
|
|
@@ -235,8 +235,6 @@ async fn realmain(args: Args, ex: Arc<Executor<'static>>) -> Result<()> {
|
|
|
return Ok(())
|
|
return Ok(())
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- let replay_mode = args.replay_mode;
|
|
|
|
|
-
|
|
|
|
|
info!("Initializing DarkIRC node");
|
|
info!("Initializing DarkIRC node");
|
|
|
|
|
|
|
|
// Create datastore path if not there already.
|
|
// Create datastore path if not there already.
|
|
@@ -244,7 +242,7 @@ async fn realmain(args: Args, ex: Arc<Executor<'static>>) -> Result<()> {
|
|
|
fs::create_dir_all(&datastore).await?;
|
|
fs::create_dir_all(&datastore).await?;
|
|
|
|
|
|
|
|
let replay_datastore = expand_path(&args.replay_datastore)?;
|
|
let replay_datastore = expand_path(&args.replay_datastore)?;
|
|
|
- fs::create_dir_all(&replay_datastore).await?;
|
|
|
|
|
|
|
+ let replay_mode = args.replay_mode;
|
|
|
|
|
|
|
|
info!("Instantiating event DAG");
|
|
info!("Instantiating event DAG");
|
|
|
let sled_db = sled::open(datastore)?;
|
|
let sled_db = sled::open(datastore)?;
|