Skip to content

Commit

Permalink
GH-525: Update rust to 1.57.0 and modify clippy related code (#86)
Browse files Browse the repository at this point in the history
* GH-457 (#1)

* GH-457: Initial cleanup of dead parameter processing. node_configurator_standard.rs and mod.rs only

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* Delete test.txt

* GH-457: Pulled commits from master, removed check_past_initialization and tests, removed TODO regarding request_existing_db_password. Removing it starts a chain of events resulting in node_configurator no longer working.

* GH-457: Removed unused import.

* GH-457: Removed request_existing_db_password and associated code, refactored get_db_password to pull from persistent config, removed associated tests

* GH-457: Restored 2 removed tests

* GH-457: Removal of streams and conflicted code.

* GH-457: Updated tests and calls to run_modes_factories.rs

* GH-457: removed unnecessary validators

* Update and rename ci-matrix.yml to ci-ubuntu-latest.yml

* Update ci-ubuntu-latest.yml

* Create ci-windows-latest.yml

* Create ci-macOS-latest.yml

* Delete ci-windows-latest.yml

* Delete ci-macOS-latest.yml

* Update and rename ci-ubuntu-latest.yml to ci-matrix.yml

* GH-457: Updated command_processor.rs with new clippy requirements

Co-authored-by: FinsaasGH <Odinallfather123>
Co-authored-by: FinsaasGH <verumeritde@protonmail.com>
Co-authored-by: FinsaasGH <finsaasgh@protonmail.com>

* GH-414: Updated generate wallets to use 12 word mnemonic phrase as default (#2)

Co-authored-by: FinsaasGH <finsaas@protonmail.com>

* Revert "GH-414: Updated generate wallets to use 12 word mnemonic phrase as default (#2)"

This reverts commit d646da9.

* Revert "GH-457 (#1)"

This reverts commit ed718c4.

* Updated command processor with new clippy changes

* GH-457 (#4)

* GH-457: Initial cleanup of dead parameter processing. node_configurator_standard.rs and mod.rs only

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* Delete test.txt

* GH-457: Pulled commits from master, removed check_past_initialization and tests, removed TODO regarding request_existing_db_password. Removing it starts a chain of events resulting in node_configurator no longer working.

* GH-457: Removed unused import.

* GH-457: Removed request_existing_db_password and associated code, refactored get_db_password to pull from persistent config, removed associated tests

* GH-457: Restored 2 removed tests

* GH-457: Removal of streams and conflicted code.

* GH-457: Updated tests and calls to run_modes_factories.rs

* GH-457: removed unnecessary validators

* Update and rename ci-matrix.yml to ci-ubuntu-latest.yml

* Update ci-ubuntu-latest.yml

* Create ci-windows-latest.yml

* Create ci-macOS-latest.yml

* Delete ci-windows-latest.yml

* Delete ci-macOS-latest.yml

* Update and rename ci-ubuntu-latest.yml to ci-matrix.yml

* GH-457: Updated command_processor.rs with new clippy requirements

Co-authored-by: FinsaasGH <finsaas@protonmail.com>
Co-authored-by: FinsaasGH <verumeritde@protonmail.com>
Co-authored-by: FinsaasGH <finsaasgh@protonmail.com>

* GH-414: Updated generate wallets to use 12 word mnemonic phrase  (#5)

* GH-414: Updated generate wallets to use 12 word mnemonic phrase as default

* Updated command processor with new clippy changes

* GH-457: Remove dead parameter processing (#58)

* GH-457: Initial cleanup of dead parameter processing. node_configurator_standard.rs and mod.rs only

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* Delete test.txt

* GH-457: Pulled commits from master, removed check_past_initialization and tests, removed TODO regarding request_existing_db_password. Removing it starts a chain of events resulting in node_configurator no longer working.

* GH-457: Removed unused import.

* GH-457: Removed request_existing_db_password and associated code, refactored get_db_password to pull from persistent config, removed associated tests

* GH-457: Restored 2 removed tests

* GH-457: Removal of streams and conflicted code.

* GH-457: Updated tests and calls to run_modes_factories.rs

* GH-457: removed unnecessary validators

* Update and rename ci-matrix.yml to ci-ubuntu-latest.yml

* Update ci-ubuntu-latest.yml

* Create ci-windows-latest.yml

* Create ci-macOS-latest.yml

* Delete ci-windows-latest.yml

* Delete ci-macOS-latest.yml

* Update and rename ci-ubuntu-latest.yml to ci-matrix.yml

* GH-457: Updated command_processor.rs with new clippy requirements

Co-authored-by: FinsaasGH <verumeritde@protonmail.com>
Co-authored-by: FinsaasGH <finsaasgh@protonmail.com>

Co-authored-by: FinsaasGH <verumeritde@protonmail.com>
Co-authored-by: FinsaasGH <finsaasgh@protonmail.com>
Co-authored-by: dnwiebe <dnwiebe@gmail.com>

* GH-418: Change copyright tags (#3)

* GH-418: Updated copyright tag in 230 files & updated authors

* GH-418: Updated copyright tag in 5 more files

* GH-457: Remove dead parameter processing (#58)

* GH-457: Initial cleanup of dead parameter processing. node_configurator_standard.rs and mod.rs only

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* Delete test.txt

* GH-457: Pulled commits from master, removed check_past_initialization and tests, removed TODO regarding request_existing_db_password. Removing it starts a chain of events resulting in node_configurator no longer working.

* GH-457: Removed unused import.

* GH-457: Removed request_existing_db_password and associated code, refactored get_db_password to pull from persistent config, removed associated tests

* GH-457: Restored 2 removed tests

* GH-457: Removal of streams and conflicted code.

* GH-457: Updated tests and calls to run_modes_factories.rs

* GH-457: removed unnecessary validators

* Update and rename ci-matrix.yml to ci-ubuntu-latest.yml

* Update ci-ubuntu-latest.yml

* Create ci-windows-latest.yml

* Create ci-macOS-latest.yml

* Delete ci-windows-latest.yml

* Delete ci-macOS-latest.yml

* Update and rename ci-ubuntu-latest.yml to ci-matrix.yml

* GH-457: Updated command_processor.rs with new clippy requirements

Co-authored-by: FinsaasGH <Odinallfather123>
Co-authored-by: FinsaasGH <verumeritde@protonmail.com>
Co-authored-by: FinsaasGH <finsaasgh@protonmail.com>

* GH-418: Updated Copyright tag to reflect changes requested. Updated license with correct syntax.

* GH-414: Change default mnemonic phrase to 12 (#59)

* GH-414: Updated generate wallets to use 12 word mnemonic phrase as default

* Updated command processor with new clippy changes

Co-authored-by: FinsaasGH <Odinallfather123>
Co-authored-by: dnwiebe <dnwiebe@gmail.com>

* GH-418: Updated daemon_and_node_modes_version_call to 2021/12/31

Co-authored-by: FinsaasGH <Odinallfather123>
Co-authored-by: FinsaasGH <verumeritde@protonmail.com>
Co-authored-by: FinsaasGH <finsaasgh@protonmail.com>
Co-authored-by: dnwiebe <dnwiebe@gmail.com>

* GH-495: Update Rust from 2018 to 2021 (#6)

* GH-473: blocked on multinode; but standard repo working; new system of descriptor wtiting roughly ready

* GH-473: schema with $ and @ done but wouldn't interact well with shells; so before the new schema with url; also Blockchains as standalone structs were originated

* GH-473: url syntax established; node unit tests all passing

* GH-473: also multinode ready; commit before restructuring blockchaininterface into full chain records

* GH-473: blockchains standardized now with their own structs for each

* GH-473: clean-up

* GH-473: formatting

* GH-473: platform specific test code - separated now

* GH-473: trying to solve platform dependant data dir in test

* GH-473: fixing path for macOs in a test

* GH-473: import issue in test

* GH-473: data dir test modified to bypass unimportant stuff

* GH-473: fixes in imports in multinode tests

* GH-473: multinode chain id corrected in a few tests

* GH-473: fixed one place where default of chain id in multinode tests was wrong; still a bad solution

* GH-473: referring chains by num IDs standardized in multinode tests now, also veryfi_bill_payment should work well

* GH-473: the code is more a standardized API for working with BlockchainRecords; also help text changed

* GH-473: final arrangement of some help and error messages

* GH-473: after Steve's review; but just half addressed

* GH-473: before sharp knifing rooted segments out - those which don't use chain_id or just Chain

* GH-473: dead-point; I refuse to go on. Let's try to restore the old design partly

* GH-473: URI like syntax is in; Neighborhood fixed but tests in other files are failing

* GH-473: working product

* GH-473: formatting

* GH-473: auto review

* GH-473: formatting

* GH-473: fix in imports for multinode tests

* GH-473: checking multinode tests in a pre-run and cleaning the rest of conflicts in imports

* GH-473: formatting

* GH-473: slashes exchange semicolons

* GH-473: messages inconsistent with tests - fixes in multinode

* GH-473: now dev chain again fills the void in ETH id system at position 2

* GH-473: formatting

* GH-488: interim commit in deploying new chain records; I stopped at mumbai chain_id too big, now a save point for changing chain id into u64 type

* GH-488: chains strongly asserted; next I'm going to remove Rinkeby as decided

* Rinkeby is out

* GH-488: clearing a comment

* GH-473: pure chain enum replaces num IDs; simplification of chain wise constants

* GH-473: interim commit; removing extra features in web3 for masq_lib

* GH-473: raw_transaction made working again, perhaps right

* GH-473: formatting

* GH-473: I forgot about fixes in multinode

* GH-473: formatting

* GH-473: two more tests for plygon chains; poly-mainnet syntax into more precise polygon-mainnet; help text

* GH-473: formatting

* GH-473: I left some defects over me

* GH-473: first part of the second review addressed

* GH-473: base64 url-safe-no-pad is configured now

* GH-473: reaction to a new version of Rust

* GH-473: simplification; I've reused code from other place for NodeReference

* GH-495: Updated Rust version from 2018 to 2021

* GH-473: hardening chain names

* GH-414: Change default mnemonic phrase to 12 (#59)

* GH-414: Updated generate wallets to use 12 word mnemonic phrase as default

* Updated command processor with new clippy changes

Co-authored-by: FinsaasGH <Odinallfather123>
Co-authored-by: dnwiebe <dnwiebe@gmail.com>

* GH-473: refactoring tests of signing transactions

* GH-418: Update copyright tags (#67)

* GH-457 (#1)

* GH-457: Initial cleanup of dead parameter processing. node_configurator_standard.rs and mod.rs only

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* GH-457: Pairing review with Dan - added initialize_database and allied tests back in

* Delete test.txt

* GH-457: Pulled commits from master, removed check_past_initialization and tests, removed TODO regarding request_existing_db_password. Removing it starts a chain of events resulting in node_configurator no longer working.

* GH-457: Removed unused import.

* GH-457: Removed request_existing_db_password and associated code, refactored get_db_password to pull from persistent config, removed associated tests

* GH-457: Restored 2 removed tests

* GH-457: Removal of streams and conflicted code.

* GH-457: Updated tests and calls to run_modes_factories.rs

* GH-457: removed unnecessary validators

* Update and rename ci-matrix.yml to ci-ubuntu-latest.yml

* Update ci-ubuntu-latest.yml

* Create ci-windows-latest.yml

* Create ci-macOS-latest.yml

* Delete ci-windows-latest.yml

* Delete ci-macOS-latest.yml

* Update and rename ci-ubuntu-latest.yml to ci-matrix.yml

* GH-457: Updated command_processor.rs with new clippy requirements

Co-authored-by: FinsaasGH <Odinallfather123>
Co-authored-by: FinsaasGH <verumeritde@protonmail.com>
Co-authored-by: FinsaasGH <finsaasgh@protonmail.com>

* GH-418: Updated copyright tag in 230 files & updated authors

* GH-418: Updated copyright tag in 5 more files

* GH-418: Updated Copyright tag to reflect changes requested. Updated license with correct syntax.

* GH-418: Updated daemon_and_node_modes_version_call to 2021/12/31

Co-authored-by: FinsaasGH <verumeritde@protonmail.com>
Co-authored-by: FinsaasGH <finsaasgh@protonmail.com>
Co-authored-by: FinsaasGH <Odinallfather123>
Co-authored-by: dnwiebe <dnwiebe@gmail.com>

* GH-473: fixes reacting to testers' comments

* GH-473: formatting

* GH-473: late fixes

* GH-473: mac specific test, detail

* GH-473: finalizing

* GH-473: mac specific stuff, one test

* GH-473: cargo lock update (not manual)

* GH-473: hardening namespace

* GH-473: late fix

* GH-500: Accept the proposal of enhanced logging and safer sending http requests to the blockchain service (#65)

* More instrumentation for payables, and a bit of renaming

* formatting

* MoreInstrumentation

* MoreInstrumentation: making scanning parameters more sober

* MoreInstrumentation - arrangement of logs in Accountant; FailedQuery now materialized by revealing a lower level cause; removed logs of low effect from Neighborhood

* MoreInstrumentation - grammatical issues with an if statement

* MoreInstrumentation: the http connection should appear just one a time now

* MoreInstrumentation: formatting

* MoreInstrumentation: new Rust fix, I forgot about this recent event

* MoreInstrumentation: trying to appease a multinode test because payment curves were changed

* MoreInstrumentation: multinode test temporarily disabled because it requires exact balances for assertions and the numbers have changed because of different payment curves

* GH-500: correction of needless stuff from the experiments with analyzing 'QueryFailed'

* GH-500: answering a review

* GH-500: forgot an unused umport

* GH-500: details in comments

Co-authored-by: Dan Wiebe <dnwiebe@gmail.com>

* GH-473: late simplification of BlockchainRecord fileds and answering the second review

* GH-473: removed redundant fieleds from BlockchainRecords, more of simplification; extra data dir for chain families is gone

* GH-473: I accidentaly excluded this from the previous commit...so catching up

* GH-473: fixing an intehration test about diff chain in db and cml

* GH-473: chain values in masq tests were old wise

* GH-473: formatting

Co-authored-by: Bert <65427484+bertllll@users.noreply.github.com>
Co-authored-by: dnwiebe <dnwiebe@gmail.com>
Co-authored-by: FinsaasGH <verumeritde@protonmail.com>
Co-authored-by: FinsaasGH <finsaasgh@protonmail.com>
Co-authored-by: KauriHero <55721017+kauri-hero@users.noreply.github.com>

* GH-525: Updated rust to 1.57.0 and modified clippy related changes

* Update get_packet.rs

* Update map_packet.rs

Co-authored-by: FinsaasGH <verumeritde@protonmail.com>
Co-authored-by: FinsaasGH <finsaasgh@protonmail.com>
Co-authored-by: FinsaasGH <Odinallfather123>
Co-authored-by: dnwiebe <dnwiebe@gmail.com>
Co-authored-by: Bert <65427484+bertllll@users.noreply.github.com>
Co-authored-by: KauriHero <55721017+kauri-hero@users.noreply.github.com>
  • Loading branch information
6 people authored Dec 3, 2021
1 parent ace88de commit e150b34
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 55 deletions.
10 changes: 0 additions & 10 deletions .idea/runConfigurations.xml

This file was deleted.

11 changes: 1 addition & 10 deletions automap/src/protocols/pmp/get_packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::any::Any;
use std::convert::TryFrom;
use std::net::Ipv4Addr;

#[derive(Clone, Debug, PartialEq)]
#[derive(Clone, Debug, PartialEq, Default)]
pub struct GetOpcodeData {
pub epoch_opt: Option<u32>,
pub external_ip_address_opt: Option<Ipv4Addr>,
Expand Down Expand Up @@ -49,15 +49,6 @@ impl OpcodeData for GetOpcodeData {

impl PmpOpcodeData for GetOpcodeData {}

impl Default for GetOpcodeData {
fn default() -> Self {
Self {
epoch_opt: None,
external_ip_address_opt: None,
}
}
}

impl TryFrom<(Direction, &[u8])> for GetOpcodeData {
type Error = ParseError;

Expand Down
13 changes: 1 addition & 12 deletions automap/src/protocols/pmp/map_packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::protocols::utils::{
use std::any::Any;
use std::convert::TryFrom;

#[derive(Clone, PartialEq, Debug)]
#[derive(Clone, PartialEq, Debug, Default)]
pub struct MapOpcodeData {
pub epoch_opt: Option<u32>,
pub internal_port: u16,
Expand Down Expand Up @@ -51,17 +51,6 @@ impl OpcodeData for MapOpcodeData {

impl PmpOpcodeData for MapOpcodeData {}

impl Default for MapOpcodeData {
fn default() -> Self {
Self {
epoch_opt: None,
internal_port: 0,
external_port: 0,
lifetime: 0,
}
}
}

impl TryFrom<(Direction, &[u8])> for MapOpcodeData {
type Error = ParseError;

Expand Down
8 changes: 1 addition & 7 deletions masq_lib/src/ui_traffic_converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,9 @@ impl Display for UnmarshalError {
}
}
}

#[derive(Default)]
pub struct UiTrafficConverter {}

impl Default for UiTrafficConverter {
fn default() -> Self {
Self {}
}
}

impl UiTrafficConverter {
pub fn new() -> Self {
Self::default()
Expand Down
2 changes: 1 addition & 1 deletion node/src/daemon/dns_inspector/win_dns_inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl DnsInspector for WinDnsInspector {
let dns_server_list_csv = self.find_dns_server_list(interfaces)?;
let ip_vec: Vec<_> = dns_server_list_csv
.split(',')
.flat_map(|ip_str| IpAddr::from_str(ip_str))
.flat_map(IpAddr::from_str)
.collect();
Ok(ip_vec)
}
Expand Down
8 changes: 1 addition & 7 deletions node/src/database/db_initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,9 @@ pub trait DbInitializer {
migrator_config: MigratorConfig,
) -> Result<Box<dyn ConnectionWrapper>, InitializationError>;
}

#[derive(Default)]
pub struct DbInitializerReal {}

impl Default for DbInitializerReal {
fn default() -> Self {
Self {}
}
}

impl DbInitializer for DbInitializerReal {
fn initialize(
&self,
Expand Down
8 changes: 4 additions & 4 deletions node/src/entry_dns/packet_facade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ impl<'a> PacketFacade<'a> {
}

pub fn clear(&mut self) {
PacketFacade::u16_to(0x0000, &mut self.buf, 4);
PacketFacade::u16_to(0x0000, &mut self.buf, 6);
PacketFacade::u16_to(0x0000, &mut self.buf, 8);
PacketFacade::u16_to(0x0000, &mut self.buf, 10);
PacketFacade::u16_to(0x0000, self.buf, 4);
PacketFacade::u16_to(0x0000, self.buf, 6);
PacketFacade::u16_to(0x0000, self.buf, 8);
PacketFacade::u16_to(0x0000, self.buf, 10);
self.length = 12
}

Expand Down
4 changes: 2 additions & 2 deletions node/src/entry_dns/processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn process(buf: &mut [u8], length: usize, addr: &SocketAddr, logger: &Logger
response_size
}

fn make_response(mut facade: &mut PacketFacade) -> usize {
fn make_response(facade: &mut PacketFacade) -> usize {
match facade.get_opcode() {
None => return make_format_error(facade),
Some(opcode) if opcode == u8::from(OpCode::Query) => (),
Expand Down Expand Up @@ -76,7 +76,7 @@ fn make_response(mut facade: &mut PacketFacade) -> usize {
3600,
&Ipv6Addr::LOCALHOST.octets(),
),
_ => return make_not_implemented_error(&mut facade),
_ => return make_not_implemented_error(facade),
};
}
facade.get_length()
Expand Down
2 changes: 0 additions & 2 deletions node/src/test_utils/persistent_configuration_mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ pub struct PersistentConfigurationMock {
mnemonic_seed_results: RefCell<Vec<Result<Option<PlainData>, PersistentConfigError>>>,
mnemonic_seed_exists_params: Arc<Mutex<Vec<()>>>,
mnemonic_seed_exists_results: RefCell<Vec<Result<bool, PersistentConfigError>>>,
set_mnemonic_seed_params: Arc<Mutex<Vec<(PlainData, String)>>>,
set_mnemonic_seed_results: RefCell<Vec<Result<(), PersistentConfigError>>>,
consuming_wallet_derivation_path_results:
RefCell<Vec<Result<Option<String>, PersistentConfigError>>>,
earning_wallet_from_address_results:
Expand Down

0 comments on commit e150b34

Please sign in to comment.