Skip to content

Commit

Permalink
added finality sync flag (availproject#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
sh3ll3x3c authored Jan 26, 2024
1 parent d3f8ff5 commit 349b0dd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "avail-light"
version = "1.7.4"
version = "1.7.5"
authors = ["Avail Team"]
default-run = "avail-light"
edition = "2021"
Expand Down
9 changes: 6 additions & 3 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ pub struct CliOpts {
/// Run a clean light client, deleting existing avail_path folder
#[arg(long)]
pub clean: bool,
/// Enable finality sync
#[arg(short, long, value_name = "finality_sync_enable")]
pub finality_sync_enable: bool,
/// P2P port
#[arg(short, long)]
pub port: Option<u16>,
Expand Down Expand Up @@ -722,10 +725,10 @@ impl Default for RuntimeConfig {
disable_rpc: false,
dht_parallelization_limit: 20,
query_proof_rpc_parallel_tasks: 8,
block_processing_delay: Some(10),
block_processing_delay: Some(15),
block_matrix_partition: None,
sync_start_block: None,
sync_finality_enable: true,
sync_finality_enable: false,
max_cells_per_rpc: Some(30),
kad_record_ttl: 24 * 60 * 60,
threshold: 5000,
Expand Down Expand Up @@ -884,7 +887,7 @@ impl RuntimeConfig {
if let Some(port) = opts.port {
self.port = port;
}

self.sync_finality_enable = opts.finality_sync_enable;
self.app_id = opts.app_id.or(self.app_id);

Ok(())
Expand Down

0 comments on commit 349b0dd

Please sign in to comment.