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-672: review 4 #327

Closed
wants to merge 10 commits into from
9 changes: 2 additions & 7 deletions multinode_integration_tests/tests/verify_bill_payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,8 @@ fn verify_bill_payment() {
"Ganache is not as predictable as we thought: Update blockchain_interface::MULTINODE_CONTRACT_ADDRESS with {:?}",
contract_addr
);
let web3_gas_const_part = web3_gas_limit_const_part(cluster.chain);
let blockchain_interface = BlockchainInterfaceNonClandestine::new(
http,
_event_loop_handle,
cluster.chain,
web3_gas_const_part,
);
let blockchain_interface =
BlockchainInterfaceNonClandestine::new(http, _event_loop_handle, cluster.chain);
assert_balances(
&contract_owner_wallet,
&blockchain_interface,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2019, MASQ (https://masq.ai) and/or its affiliates. All rights reserved.

use crate::accountant::big_int_processing::big_int_divider::BigIntDivider;
use crate::accountant::big_int::big_int_divider::BigIntDivider;
use crate::accountant::checked_conversion;
use crate::accountant::database_access_objects::payable_dao::PayableDaoError;
use crate::accountant::database_access_objects::receivable_dao::ReceivableDaoError;
Expand Down Expand Up @@ -498,12 +498,10 @@ big_int_db_error_from!(PayableDaoError, ReceivableDaoError);
#[cfg(test)]
mod tests {
use super::*;
use crate::accountant::big_int_processing::big_int_db_processor::ByteMagnitude::{High, Low};
use crate::accountant::big_int_processing::big_int_db_processor::KnownKeyVariants::TestKey;
use crate::accountant::big_int_processing::big_int_db_processor::WeiChange::{
Addition, Subtraction,
};
use crate::accountant::big_int_processing::test_utils::restricted::{
use crate::accountant::big_int::big_int_db_processor::ByteMagnitude::{High, Low};
use crate::accountant::big_int::big_int_db_processor::KnownKeyVariants::TestKey;
use crate::accountant::big_int::big_int_db_processor::WeiChange::{Addition, Subtraction};
use crate::accountant::big_int::test_utils::restricted::{
create_new_empty_db, test_database_key,
};
use crate::database::connection_wrapper::{ConnectionWrapper, ConnectionWrapperReal};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2019, MASQ (https://masq.ai) and/or its affiliates. All rights reserved.

use crate::accountant::big_int_processing::big_int_divider::UserDefinedFunctionError::InvalidInputValue;
use crate::accountant::big_int::big_int_divider::UserDefinedFunctionError::InvalidInputValue;
use crate::accountant::gwei_to_wei;
use rusqlite::functions::{Context, FunctionFlags};
use rusqlite::Connection;
Expand Down Expand Up @@ -135,7 +135,7 @@ impl Display for UserDefinedFunctionError {
#[cfg(test)]
mod tests {
use super::*;
use crate::accountant::big_int_processing::test_utils::restricted::create_new_empty_db;
use crate::accountant::big_int::test_utils::restricted::create_new_empty_db;
use rusqlite::Error::SqliteFailure;
use rusqlite::ErrorCode;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2019, MASQ (https://masq.ai) and/or its affiliates. All rights reserved.

pub(in crate::accountant::big_int_processing) mod restricted {
use crate::accountant::big_int_processing::big_int_db_processor::KnownKeyVariants::TestKey;
use crate::accountant::big_int_processing::big_int_db_processor::{
pub(in crate::accountant::big_int) mod restricted {
use crate::accountant::big_int::big_int_db_processor::KnownKeyVariants::TestKey;
use crate::accountant::big_int::big_int_db_processor::{
ExtendedParamsMarker, KnownKeyVariants,
};
use masq_lib::test_utils::utils::ensure_node_home_directory_exists;
Expand Down
8 changes: 4 additions & 4 deletions node/src/accountant/database_access_objects/payable_dao.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Copyright (c) 2019, MASQ (https://masq.ai) and/or its affiliates. All rights reserved.

use crate::accountant::big_int_processing::big_int_db_processor::KnownKeyVariants::{
use crate::accountant::big_int::big_int_db_processor::KnownKeyVariants::{
PendingPayableRowid, WalletAddress,
};
use crate::accountant::big_int_processing::big_int_db_processor::WeiChange::{
use crate::accountant::big_int::big_int_db_processor::WeiChange::{
Addition, Subtraction,
};
use crate::accountant::big_int_processing::big_int_db_processor::{
use crate::accountant::big_int::big_int_db_processor::{
BigIntDbProcessor, BigIntSqlConfig, Param, SQLParamsBuilder, TableNameDAO,
};
use crate::accountant::big_int_processing::big_int_divider::BigIntDivider;
use crate::accountant::big_int::big_int_divider::BigIntDivider;
use crate::accountant::database_access_objects::utils;
use crate::accountant::database_access_objects::utils::{
sum_i128_values_from_table, to_time_t, AssemblerFeeder, CustomQuery, DaoFactoryReal,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2019, MASQ (https://masq.ai) and/or its affiliates. All rights reserved.

use crate::accountant::big_int_processing::big_int_divider::BigIntDivider;
use crate::accountant::big_int::big_int_divider::BigIntDivider;
use crate::accountant::database_access_objects::utils::{
from_time_t, to_time_t, DaoFactoryReal, VigilantRusqliteFlatten,
};
Expand Down Expand Up @@ -241,7 +241,7 @@ impl<'a> PendingPayableDaoReal<'a> {

#[cfg(test)]
mod tests {
use crate::accountant::big_int_processing::big_int_divider::BigIntDivider;
use crate::accountant::big_int::big_int_divider::BigIntDivider;
use crate::accountant::checked_conversion;
use crate::accountant::database_access_objects::pending_payable_dao::{
PendingPayableDao, PendingPayableDaoError, PendingPayableDaoReal,
Expand Down
10 changes: 4 additions & 6 deletions node/src/accountant/database_access_objects/receivable_dao.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// Copyright (c) 2019, MASQ (https://masq.ai) and/or its affiliates. All rights reserved.

use crate::accountant::big_int_processing::big_int_db_processor::KnownKeyVariants::WalletAddress;
use crate::accountant::big_int_processing::big_int_db_processor::WeiChange::{
Addition, Subtraction,
};
use crate::accountant::big_int_processing::big_int_db_processor::{
use crate::accountant::big_int::big_int_db_processor::KnownKeyVariants::WalletAddress;
use crate::accountant::big_int::big_int_db_processor::WeiChange::{Addition, Subtraction};
use crate::accountant::big_int::big_int_db_processor::{
BigIntDbProcessor, BigIntSqlConfig, Param, SQLParamsBuilder, TableNameDAO,
};
use crate::accountant::big_int_processing::big_int_divider::BigIntDivider;
use crate::accountant::big_int::big_int_divider::BigIntDivider;
use crate::accountant::checked_conversion;
use crate::accountant::database_access_objects::receivable_dao::ReceivableDaoError::RusqliteError;
use crate::accountant::database_access_objects::utils;
Expand Down
2 changes: 1 addition & 1 deletion node/src/accountant/database_access_objects/utils.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2019, MASQ (https://masq.ai) and/or its affiliates. All rights reserved.

use crate::accountant::big_int_processing::big_int_divider::BigIntDivider;
use crate::accountant::big_int::big_int_divider::BigIntDivider;
use crate::accountant::database_access_objects::payable_dao::PayableAccount;
use crate::accountant::database_access_objects::receivable_dao::ReceivableAccount;
use crate::accountant::{checked_conversion, gwei_to_wei, sign_conversion};
Expand Down
Loading