Skip to content

Commit 93e3d7e

Browse files
committed
GH-598: merged master in
2 parents 3b9d70f + ef08892 commit 93e3d7e

25 files changed

Lines changed: 466 additions & 103 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Temporary Items
5959
**/.idea/markdown-navigator/**
6060
**/.idea/aws.xml
6161
**/.idea/scopes/*.xml
62+
**/.idea/copilot*
6263

6364
# Sensitive or high-churn files:
6465
**/.idea/**/dataSources/

automap/Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

automap/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "automap"
3-
version = "0.9.0"
3+
version = "0.9.1"
44
authors = ["Dan Wiebe <dnwiebe@gmail.com>", "MASQ"]
55
license = "GPL-3.0-only"
66
description = "Library full of code to make routers map ports through firewalls"

dns_utility/Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dns_utility/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dns_utility"
3-
version = "0.9.0"
3+
version = "0.9.1"
44
license = "GPL-3.0-only"
55
authors = ["Dan Wiebe <dnwiebe@gmail.com>", "MASQ"]
66
copyright = "Copyright (c) 2019, MASQ (https://masq.ai) and/or its affiliates. All rights reserved."

ip_country/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ip_country"
3-
version = "0.1.0"
3+
version = "0.9.1"
44
edition = "2021"
55
license = "GPL-3.0-only"
66
authors = ["Dan Wiebe <dnwiebe@gmail.com>", "MASQ"]

masq/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "masq"
3-
version = "0.9.0"
3+
version = "0.9.1"
44
authors = ["Dan Wiebe <dnwiebe@gmail.com>", "MASQ"]
55
license = "GPL-3.0-only"
66
description = "Reference implementation of user interface for MASQ Node"

masq_lib/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "masq_lib"
3-
version = "0.9.0"
3+
version = "0.9.1"
44
authors = ["Dan Wiebe <dnwiebe@gmail.com>", "MASQ"]
55
license = "GPL-3.0-only"
66
description = "Code common to Node and masq; also, temporarily, to dns_utility"

masq_lib/src/shared_schema.rs

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::constants::{
77
POLYGON_MAINNET_FULL_IDENTIFIER,
88
};
99
use crate::crash_point::CrashPoint;
10-
use clap::{App, Arg};
10+
use clap::{arg_enum, App, Arg};
1111
use lazy_static::lazy_static;
1212

1313
pub const BLOCKCHAIN_SERVICE_HELP: &str =
@@ -81,6 +81,17 @@ pub const NEIGHBORS_HELP: &str = "One or more Node descriptors for running Nodes
8181
if you don't specify a neighbor, your Node will start without being connected to any MASQ \
8282
Network, although other Nodes will be able to connect to yours if they know your Node's descriptor. \
8383
--neighbors is meaningless in --neighborhood-mode zero-hop.";
84+
pub const NEW_PUBLIC_KEY_HELP: &str = "Whenever you start it, the Node will try to use the same public key \
85+
it used last time. That's '--new-public-key off'. If you want it to select a new public key when it \
86+
starts, then specify '--new-public-key on', and you'll get a different one this time...which it will \
87+
reuse next time unless you specify '--new-public-key on' again.\n\n\
88+
You should be careful about restarting your Node with the same public key too quickly. If your new \
89+
Node tries to join the Network before the Network has forgotten your old Node, every Node you try \
90+
to connect to will ignore you.\n\n\
91+
There are some conditions under which the Node cannot use the same public key it used last time: \
92+
for example, if there was no last time, or if you don't specify a `--db-password`. Normally, in \
93+
these situations, the Node will select a new public key and store it for future use; but if you \
94+
explicitly demand the old public key with `--new-public-key off`, the Node will refuse to start.";
8495

8596
// generated valid encoded keys for future needs
8697
// UJNoZW5p/PDVqEjpr3b+8jZ/93yPG8i5dOAgE1bhK+A
@@ -225,6 +236,14 @@ lazy_static! {
225236
DEFAULT_GAS_PRICE);
226237
}
227238

239+
arg_enum! {
240+
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
241+
pub enum OnOff {
242+
On,
243+
Off,
244+
}
245+
}
246+
228247
// These Args are needed in more than one clap schema. To avoid code duplication, they're defined here and referred
229248
// to from multiple places.
230249
pub fn chain_arg<'a>() -> Arg<'a, 'a> {
@@ -466,13 +485,23 @@ pub fn shared_app(head: App<'static, 'static>) -> App<'static, 'static> {
466485
.min_values(0)
467486
.help(NEIGHBORS_HELP),
468487
)
488+
.arg(
489+
Arg::with_name("new-public-key")
490+
.long("new-public-key")
491+
.value_name("NEW-PUBLIC-KEY")
492+
.takes_value(true)
493+
.possible_values(&OnOff::variants())
494+
.case_insensitive(true)
495+
.help(NEW_PUBLIC_KEY_HELP),
496+
)
469497
.arg(real_user_arg())
470498
.arg(
471499
Arg::with_name("scans")
472500
.long("scans")
473501
.value_name("SCANS")
474502
.takes_value(true)
475-
.possible_values(&["on", "off"])
503+
.possible_values(&OnOff::variants())
504+
.case_insensitive(true)
476505
.help(SCANS_HELP),
477506
)
478507
.arg(common_parameter_with_separate_u64_values(

multinode_integration_tests/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "multinode_integration_tests"
3-
version = "0.9.0"
3+
version = "0.9.1"
44
authors = ["Dan Wiebe <dnwiebe@gmail.com>", "MASQ"]
55
license = "GPL-3.0-only"
66
description = ""

0 commit comments

Comments
 (0)