Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
light(on_demand): decrease default time window to 10 secs (#10016)
Browse files Browse the repository at this point in the history
* light(on_demand): decrease default time window to 10 secs

* light(on_demand): use secs units for cli options
  • Loading branch information
ordian authored and sorpaas committed Dec 5, 2018
1 parent 7fb3379 commit dc3b1ec
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ethcore/light/src/on_demand/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub const DEFAULT_REQUEST_MIN_BACKOFF_DURATION: Duration = Duration::from_secs(1
/// The maximum request interval for OnDemand queries
pub const DEFAULT_REQUEST_MAX_BACKOFF_DURATION: Duration = Duration::from_secs(100);
/// The default window length a response is evaluated
pub const DEFAULT_RESPONSE_TIME_TO_LIVE: Duration = Duration::from_secs(60);
pub const DEFAULT_RESPONSE_TIME_TO_LIVE: Duration = Duration::from_secs(10);
/// The default number of maximum backoff iterations
pub const DEFAULT_MAX_REQUEST_BACKOFF_ROUNDS: usize = 10;
/// The default number failed request to be regarded as failure
Expand Down
12 changes: 6 additions & 6 deletions parity/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1835,9 +1835,9 @@ mod tests {
arg_snapshot_threads: None,

// -- Light options.
arg_on_demand_response_time_window: Some(2000),
arg_on_demand_request_backoff_start: Some(9000),
arg_on_demand_request_backoff_max: Some(15000),
arg_on_demand_response_time_window: Some(2),
arg_on_demand_request_backoff_start: Some(9),
arg_on_demand_request_backoff_max: Some(15),
arg_on_demand_request_backoff_rounds_max: Some(100),
arg_on_demand_request_consecutive_failures: Some(1),

Expand Down Expand Up @@ -2093,9 +2093,9 @@ mod tests {
num_verifiers: None,
}),
light: Some(Light {
on_demand_response_time_window: Some(2000),
on_demand_request_backoff_start: Some(9000),
on_demand_request_backoff_max: Some(15000),
on_demand_response_time_window: Some(2),
on_demand_request_backoff_start: Some(9),
on_demand_request_backoff_max: Some(15),
on_demand_request_backoff_rounds_max: Some(10),
on_demand_request_consecutive_failures: Some(1),
}),
Expand Down
6 changes: 3 additions & 3 deletions parity/cli/tests/config.full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ scale_verifiers = true
num_verifiers = 6

[light]
on_demand_response_time_window = 2000
on_demand_request_backoff_start = 9000
on_demand_request_backoff_max = 15000
on_demand_response_time_window = 2
on_demand_request_backoff_start = 9
on_demand_request_backoff_max = 15
on_demand_request_backoff_rounds_max = 100
on_demand_request_consecutive_failures = 1

Expand Down
6 changes: 3 additions & 3 deletions parity/cli/tests/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ fat_db = "off"
scale_verifiers = false

[light]
on_demand_response_time_window = 2000
on_demand_request_backoff_start = 9000
on_demand_request_backoff_max = 15000
on_demand_response_time_window = 2
on_demand_request_backoff_start = 9
on_demand_request_backoff_max = 15
on_demand_request_backoff_rounds_max = 10
on_demand_request_consecutive_failures = 1

Expand Down

0 comments on commit dc3b1ec

Please sign in to comment.