Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-600: Add get_block_number #193

Merged
merged 12 commits into from
Oct 10, 2023
12 changes: 12 additions & 0 deletions masq/src/commands/configuration_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ impl ConfigurationCommand {
&Self::interpret_option(&configuration.earning_wallet_address_opt),
);
dump_parameter_line(stream, "Gas price:", &configuration.gas_price.to_string());
dump_parameter_line(
stream,
"Max block count:",
&configuration
.max_block_count_opt
.map(|m| m.separate_with_commas())
.unwrap_or_else(|| "[Unlimited]".to_string()),
);
dump_parameter_line(
stream,
"Neighborhood mode:",
Expand Down Expand Up @@ -306,6 +314,7 @@ mod tests {
chain_name: "ropsten".to_string(),
gas_price: 2345,
neighborhood_mode: "standard".to_string(),
max_block_count_opt: None,
consuming_wallet_private_key_opt: Some("consuming wallet private key".to_string()),
consuming_wallet_address_opt: Some("consuming wallet address".to_string()),
earning_wallet_address_opt: Some("earning address".to_string()),
Expand Down Expand Up @@ -367,6 +376,7 @@ mod tests {
|Current schema version: schema version\n\
|Earning wallet address: earning address\n\
|Gas price: 2345\n\
|Max block count: [Unlimited]\n\
|Neighborhood mode: standard\n\
|Port mapping protocol: PCP\n\
|Start block: 3456\n\
Expand Down Expand Up @@ -403,6 +413,7 @@ mod tests {
clandestine_port: 1234,
chain_name: "mumbai".to_string(),
gas_price: 2345,
max_block_count_opt: Some(100_000),
neighborhood_mode: "zero-hop".to_string(),
consuming_wallet_address_opt: None,
consuming_wallet_private_key_opt: None,
Expand Down Expand Up @@ -463,6 +474,7 @@ mod tests {
|Current schema version: schema version\n\
|Earning wallet address: earning wallet\n\
|Gas price: 2345\n\
|Max block count: 100,000\n\
|Neighborhood mode: zero-hop\n\
|Port mapping protocol: PCP\n\
|Start block: 3456\n\
Expand Down
2 changes: 1 addition & 1 deletion masq_lib/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::data_version::DataVersion;
use const_format::concatcp;

pub const DEFAULT_CHAIN: Chain = Chain::PolyMainnet;
pub const CURRENT_SCHEMA_VERSION: usize = 8;
pub const CURRENT_SCHEMA_VERSION: usize = 9;

pub const HIGHEST_RANDOM_CLANDESTINE_PORT: u16 = 9999;
pub const HTTP_PORT: u16 = 80;
Expand Down
2 changes: 2 additions & 0 deletions masq_lib/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ pub struct UiConfigurationResponse {
pub earning_wallet_address_opt: Option<String>,
#[serde(rename = "gasPrice")]
pub gas_price: u64,
#[serde(rename = "maxBlockCount")]
pub max_block_count_opt: Option<u64>,
#[serde(rename = "neighborhoodMode")]
pub neighborhood_mode: String,
#[serde(rename = "portMappingProtocol")]
Expand Down
10 changes: 5 additions & 5 deletions multinode_integration_tests/docker/macos/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM rust:stretch
FROM rust:bullseye

ARG uid
ARG gid

RUN (addgroup substratum --gid $gid || continue) \
&& adduser --disabled-password --uid $uid --gid $gid --home /home/substratum substratum \
&& chown -R $uid:$gid /home/substratum
RUN (addgroup masq --gid $gid || continue) \
&& adduser --disabled-password --uid $uid --gid $gid --home /home/masq masq \
&& chown -R $uid:$gid /home/masq

RUN apt-get update && apt-get install -y sudo curl && rustup component add rustfmt clippy \
&& cargo install sccache && chown -R $uid:$gid /usr/local/cargo /usr/local/rustup

USER substratum
USER masq
Loading
Loading