From 57c4a485a2665a76a2bb9298585b8de036f124e5 Mon Sep 17 00:00:00 2001 From: librelois <elois@ifee.fr> Date: Fri, 16 Aug 2019 15:22:55 +0200 Subject: [PATCH] [ref] rename crate: dup-currency-params -> dubp-currency-params --- lib/core/conf/Cargo.toml | 2 +- lib/core/conf/src/lib.rs | 2 +- lib/core/core/Cargo.toml | 2 +- lib/core/core/src/errors.rs | 2 +- lib/core/core/src/lib.rs | 4 ++-- lib/core/message/Cargo.toml | 2 +- lib/core/message/src/events.rs | 2 +- lib/core/module/Cargo.toml | 2 +- lib/core/module/src/lib.rs | 2 +- lib/dubp/documents/src/documents/block/v10.rs | 4 ++-- lib/dubp/documents/src/parsers/blocks.rs | 4 ++-- lib/dunp/network-documents/Cargo.toml | 2 +- lib/dunp/network-documents/src/network_head_v3.rs | 2 +- lib/dunp/network-documents/src/network_peer.rs | 2 +- lib/modules/blockchain/blockchain-dal/Cargo.toml | 2 +- .../blockchain/blockchain-dal/src/entities/fork_tree.rs | 4 ++-- .../blockchain-dal/src/readers/currency_params.rs | 6 +++--- .../blockchain/blockchain-dal/src/writers/certification.rs | 2 +- .../blockchain/blockchain-dal/src/writers/fork_tree.rs | 2 +- .../blockchain/blockchain-dal/src/writers/identity.rs | 2 +- .../blockchain/blockchain-dal/src/writers/requests.rs | 2 +- lib/modules/blockchain/blockchain/Cargo.toml | 2 +- lib/modules/blockchain/blockchain/src/dbex.rs | 2 +- lib/modules/blockchain/blockchain/src/fork/fork_algo.rs | 2 +- lib/modules/blockchain/blockchain/src/lib.rs | 4 ++-- lib/modules/blockchain/blockchain/src/sync/apply/mod.rs | 2 +- lib/modules/blockchain/blockchain/src/sync/mod.rs | 4 ++-- lib/modules/skeleton/Cargo.toml | 2 +- lib/modules/skeleton/lib.rs | 2 +- lib/modules/tui/Cargo.toml | 2 +- lib/modules/tui/lib.rs | 2 +- lib/modules/ws2p-v1-legacy/Cargo.toml | 2 +- lib/modules/ws2p-v1-legacy/src/lib.rs | 2 +- lib/modules/ws2p/ws2p-messages/Cargo.toml | 2 +- lib/modules/ws2p/ws2p-messages/lib.rs | 2 +- lib/modules/ws2p/ws2p-messages/v2/mod.rs | 2 +- lib/modules/ws2p/ws2p-protocol/Cargo.toml | 2 +- lib/modules/ws2p/ws2p-protocol/src/controller/meta_datas.rs | 2 +- lib/modules/ws2p/ws2p/Cargo.toml | 2 +- .../ws2p/ws2p/src/controllers/incoming_connections.rs | 2 +- .../ws2p/ws2p/src/controllers/outgoing_connections.rs | 2 +- lib/modules/ws2p/ws2p/src/generate_peer.rs | 2 +- lib/modules/ws2p/ws2p/src/lib.rs | 2 +- lib/modules/ws2p/ws2p/src/services/outgoing.rs | 2 +- lib/modules/ws2p/ws2p/tests/connection_negociation.rs | 2 +- lib/tests-tools/documents-tests-tools/Cargo.toml | 2 +- lib/tests-tools/documents-tests-tools/src/mocks/mod.rs | 2 +- 47 files changed, 55 insertions(+), 55 deletions(-) diff --git a/lib/core/conf/Cargo.toml b/lib/core/conf/Cargo.toml index 2bf01271..d0517034 100644 --- a/lib/core/conf/Cargo.toml +++ b/lib/core/conf/Cargo.toml @@ -12,7 +12,7 @@ path = "src/lib.rs" [dependencies] dirs = "1.0.2" dup-crypto = { path = "../../crypto" } -dup-currency-params = { path = "../../dubp/currency-params" } +dubp-currency-params = { path = "../../dubp/currency-params" } dubp-documents= { path = "../../dubp/documents" } durs-module = { path = "../module" } durs-common-tools = { path = "../../tools/common-tools" } diff --git a/lib/core/conf/src/lib.rs b/lib/core/conf/src/lib.rs index b043e451..cee360cc 100644 --- a/lib/core/conf/src/lib.rs +++ b/lib/core/conf/src/lib.rs @@ -36,8 +36,8 @@ pub mod constants; pub mod keys; use crate::constants::MODULES_DATAS_FOLDER; +use dubp_currency_params::CurrencyName; use dup_crypto::keys::*; -use dup_currency_params::CurrencyName; use durs_common_tools::fatal_error; use durs_module::{ DursConfTrait, DursGlobalConfTrait, ModuleName, RequiredKeys, RequiredKeysContent, diff --git a/lib/core/core/Cargo.toml b/lib/core/core/Cargo.toml index eae60896..891f5b32 100644 --- a/lib/core/core/Cargo.toml +++ b/lib/core/core/Cargo.toml @@ -15,7 +15,7 @@ durs-blockchain = { path = "../../modules/blockchain/blockchain" } durs-common-tools = { path = "../../tools/common-tools" } durs-conf = { path = "../conf" } dup-crypto = { path = "../../crypto" } -dup-currency-params = { path = "../../dubp/currency-params" } +dubp-currency-params = { path = "../../dubp/currency-params" } durs-message = { path = "../message" } durs-module = { path = "../module" } durs-network = { path = "../network" } diff --git a/lib/core/core/src/errors.rs b/lib/core/core/src/errors.rs index fac90040..80d35374 100644 --- a/lib/core/core/src/errors.rs +++ b/lib/core/core/src/errors.rs @@ -16,7 +16,7 @@ //! Manage Dunitrust core errors. use crate::logger::InitLoggerError; -use dup_currency_params::db::CurrencyParamsDbError; +use dubp_currency_params::db::CurrencyParamsDbError; use durs_module::{ModuleStaticName, PlugModuleError}; use failure::{Error, Fail}; diff --git a/lib/core/core/src/lib.rs b/lib/core/core/src/lib.rs index 58337d23..cb07c8d0 100644 --- a/lib/core/core/src/lib.rs +++ b/lib/core/core/src/lib.rs @@ -42,7 +42,7 @@ mod router; use crate::commands::*; use crate::constants::DEFAULT_USER_PROFILE; use crate::errors::DursCoreError; -use dup_currency_params::CurrencyName; +use dubp_currency_params::CurrencyName; use durs_blockchain::{BlockchainModule, DBExQuery}; use durs_common_tools::fatal_error; pub use durs_conf::{ @@ -261,7 +261,7 @@ impl DursCore<DuRsConf> { info!("Success to load global conf."); // Get currency name - let currency_name = dup_currency_params::db::get_currency_name(durs_conf::get_datas_path( + let currency_name = dubp_currency_params::db::get_currency_name(durs_conf::get_datas_path( profile_path.clone(), )) .map_err(DursCoreError::FailReadCurrencyParamsDb)?; diff --git a/lib/core/message/Cargo.toml b/lib/core/message/Cargo.toml index 89a8615c..6494bc93 100644 --- a/lib/core/message/Cargo.toml +++ b/lib/core/message/Cargo.toml @@ -11,7 +11,7 @@ path = "src/lib.rs" [dependencies] dup-crypto = { path = "../../crypto" } -dup-currency-params = { path = "../../dubp/currency-params" } +dubp-currency-params = { path = "../../dubp/currency-params" } dubp-documents= { path = "../../dubp/documents" } durs-module = { path = "../module" } durs-network = { path = "../network" } diff --git a/lib/core/message/src/events.rs b/lib/core/message/src/events.rs index 632872b0..f3b9df2e 100644 --- a/lib/core/message/src/events.rs +++ b/lib/core/message/src/events.rs @@ -47,7 +47,7 @@ pub enum MemPoolEvent { /// Blockchain module events pub enum BlockchainEvent { /// Currency parameters - CurrencyParameters(dup_currency_params::CurrencyParameters), + CurrencyParameters(dubp_currency_params::CurrencyParameters), /// Stack up new valid block in local blockchain StackUpValidBlock(Box<BlockDocument>), /// Revert blocks in local blockchain diff --git a/lib/core/module/Cargo.toml b/lib/core/module/Cargo.toml index 1c047373..dba78f84 100644 --- a/lib/core/module/Cargo.toml +++ b/lib/core/module/Cargo.toml @@ -11,7 +11,7 @@ path = "src/lib.rs" [dependencies] dup-crypto = { path = "../../crypto" } -dup-currency-params = { path = "../../dubp/currency-params" } +dubp-currency-params = { path = "../../dubp/currency-params" } dubp-documents = { path = "../../dubp/documents" } durs-common-tools = { path = "../../tools/common-tools" } durs-network-documents = { path = "../../dunp/network-documents" } diff --git a/lib/core/module/src/lib.rs b/lib/core/module/src/lib.rs index 2259fdcd..d0a09fd3 100644 --- a/lib/core/module/src/lib.rs +++ b/lib/core/module/src/lib.rs @@ -31,8 +31,8 @@ #[macro_use] extern crate serde_derive; +use dubp_currency_params::CurrencyName; use dup_crypto::keys::{KeyPair, KeyPairEnum}; -use dup_currency_params::CurrencyName; use durs_common_tools::fatal_error; use durs_common_tools::traits::merge::Merge; use durs_network_documents::network_endpoint::{ApiPart, EndpointEnum}; diff --git a/lib/dubp/documents/src/documents/block/v10.rs b/lib/dubp/documents/src/documents/block/v10.rs index 2834d9d9..2a30f302 100644 --- a/lib/dubp/documents/src/documents/block/v10.rs +++ b/lib/dubp/documents/src/documents/block/v10.rs @@ -15,10 +15,10 @@ //! Wrappers around Block document V10. -use dup_crypto::hashs::Hash; -use dup_crypto::keys::*; use dubp_currency_params::genesis_block_params::v10::BlockV10Parameters; use dubp_currency_params::CurrencyName; +use dup_crypto::hashs::Hash; +use dup_crypto::keys::*; use durs_common_tools::fatal_error; use std::ops::Deref; use unwrap::unwrap; diff --git a/lib/dubp/documents/src/parsers/blocks.rs b/lib/dubp/documents/src/parsers/blocks.rs index 0aee4e58..5070a5f3 100644 --- a/lib/dubp/documents/src/parsers/blocks.rs +++ b/lib/dubp/documents/src/parsers/blocks.rs @@ -17,11 +17,11 @@ use crate::documents::block::{v10::TxDocOrTxHash, BlockDocument, BlockDocumentV1 use crate::documents::membership::v10::MembershipType; use crate::parsers::{serde_json_value_to_pest_json_value, DefaultHasher}; use crate::*; +use dubp_currency_params::genesis_block_params::v10::BlockV10Parameters; +use dubp_currency_params::CurrencyName; use dup_crypto::bases::BaseConvertionError; use dup_crypto::hashs::Hash; use dup_crypto::keys::*; -use dubp_currency_params::genesis_block_params::v10::BlockV10Parameters; -use dubp_currency_params::CurrencyName; use failure::Error; use json_pest_parser::*; use std::str::FromStr; diff --git a/lib/dunp/network-documents/Cargo.toml b/lib/dunp/network-documents/Cargo.toml index 91050a97..755dd902 100644 --- a/lib/dunp/network-documents/Cargo.toml +++ b/lib/dunp/network-documents/Cargo.toml @@ -15,7 +15,7 @@ path = "src/lib.rs" base58 = "0.1.*" durs-common-tools = { path = "../../tools/common-tools" } dup-crypto = { path = "../../crypto" } -dup-currency-params = { path = "../../dubp/currency-params" } +dubp-currency-params = { path = "../../dubp/currency-params" } dubp-documents= { path = "../../dubp/documents" } failure = "0.1.5" hex = "0.3.*" diff --git a/lib/dunp/network-documents/src/network_head_v3.rs b/lib/dunp/network-documents/src/network_head_v3.rs index 095bf15e..17d7ab26 100644 --- a/lib/dunp/network-documents/src/network_head_v3.rs +++ b/lib/dunp/network-documents/src/network_head_v3.rs @@ -18,11 +18,11 @@ use crate::network_head::NetworkHead; use crate::*; use base58::ToBase58; +use dubp_currency_params::CurrencyName; use dubp_documents::blockstamp::Blockstamp; use dubp_documents::{BlockHash, BlockNumber, ToStringObject}; use dup_crypto::keys::text_signable::TextSignable; use dup_crypto::keys::*; -use dup_currency_params::CurrencyName; use pest::iterators::Pair; use pest::Parser; use std::cmp::Ordering; diff --git a/lib/dunp/network-documents/src/network_peer.rs b/lib/dunp/network-documents/src/network_peer.rs index cf2a6150..851495dc 100644 --- a/lib/dunp/network-documents/src/network_peer.rs +++ b/lib/dunp/network-documents/src/network_peer.rs @@ -18,12 +18,12 @@ use crate::network_endpoint::*; use crate::*; use base58::ToBase58; +use dubp_currency_params::CurrencyName; use dubp_documents::blockstamp::Blockstamp; use dubp_documents::BlockNumber; use dubp_documents::ToStringObject; use dup_crypto::keys::text_signable::TextSignable; use dup_crypto::keys::*; -use dup_currency_params::CurrencyName; use pest::iterators::Pair; use pest::Parser; diff --git a/lib/modules/blockchain/blockchain-dal/Cargo.toml b/lib/modules/blockchain/blockchain-dal/Cargo.toml index 94f86603..536a7da6 100644 --- a/lib/modules/blockchain/blockchain-dal/Cargo.toml +++ b/lib/modules/blockchain/blockchain-dal/Cargo.toml @@ -11,7 +11,7 @@ path = "src/lib.rs" [dependencies] dup-crypto = { path = "../../../crypto" } -dup-currency-params = { path = "../../../dubp/currency-params" } +dubp-currency-params = { path = "../../../dubp/currency-params" } dubp-documents= { path = "../../../dubp/documents" } durs-conf = { path = "../../../core/conf" } durs-module = { path = "../../../core/module" } diff --git a/lib/modules/blockchain/blockchain-dal/src/entities/fork_tree.rs b/lib/modules/blockchain/blockchain-dal/src/entities/fork_tree.rs index 409e4cfc..4a0f6303 100644 --- a/lib/modules/blockchain/blockchain-dal/src/entities/fork_tree.rs +++ b/lib/modules/blockchain/blockchain-dal/src/entities/fork_tree.rs @@ -123,7 +123,7 @@ pub struct ForkTree { impl Default for ForkTree { #[inline] fn default() -> Self { - ForkTree::new(*dup_currency_params::constants::DEFAULT_FORK_WINDOW_SIZE) + ForkTree::new(*dubp_currency_params::constants::DEFAULT_FORK_WINDOW_SIZE) } } @@ -451,7 +451,7 @@ impl ForkTree { mod tests { use super::*; - use dup_currency_params::constants::DEFAULT_FORK_WINDOW_SIZE; + use dubp_currency_params::constants::DEFAULT_FORK_WINDOW_SIZE; #[test] fn insert_root_nodes() { diff --git a/lib/modules/blockchain/blockchain-dal/src/readers/currency_params.rs b/lib/modules/blockchain/blockchain-dal/src/readers/currency_params.rs index df471f6b..f061dab2 100644 --- a/lib/modules/blockchain/blockchain-dal/src/readers/currency_params.rs +++ b/lib/modules/blockchain/blockchain-dal/src/readers/currency_params.rs @@ -14,11 +14,11 @@ // along with this program. If not, see <https://www.gnu.org/licenses/>. use crate::*; +use dubp_currency_params::db::write_currency_params; +use dubp_currency_params::genesis_block_params::GenesisBlockParams; +use dubp_currency_params::CurrencyParameters; use dubp_documents::documents::block::{BlockDocument, BlockDocumentTrait}; use dubp_documents::Document; -use dup_currency_params::db::write_currency_params; -use dup_currency_params::genesis_block_params::GenesisBlockParams; -use dup_currency_params::CurrencyParameters; use unwrap::unwrap; /// Get and write currency params diff --git a/lib/modules/blockchain/blockchain-dal/src/writers/certification.rs b/lib/modules/blockchain/blockchain-dal/src/writers/certification.rs index 28ce1234..a42cecb8 100644 --- a/lib/modules/blockchain/blockchain-dal/src/writers/certification.rs +++ b/lib/modules/blockchain/blockchain-dal/src/writers/certification.rs @@ -14,10 +14,10 @@ // along with this program. If not, see <https://www.gnu.org/licenses/>. use crate::{BinDB, CertsExpirV10Datas, DALError, IdentitiesV10Datas}; +use dubp_currency_params::CurrencyParameters; use dubp_documents::documents::certification::CompactCertificationDocumentV10; use dubp_documents::BlockNumber; use dup_crypto::keys::*; -use dup_currency_params::CurrencyParameters; use durs_wot::NodeId; /// Apply "certification" event in databases diff --git a/lib/modules/blockchain/blockchain-dal/src/writers/fork_tree.rs b/lib/modules/blockchain/blockchain-dal/src/writers/fork_tree.rs index 8deb8469..d26b3810 100644 --- a/lib/modules/blockchain/blockchain-dal/src/writers/fork_tree.rs +++ b/lib/modules/blockchain/blockchain-dal/src/writers/fork_tree.rs @@ -90,7 +90,7 @@ mod test { use super::*; use crate::entities::fork_tree::TreeNodeId; - use dup_currency_params::constants::DEFAULT_FORK_WINDOW_SIZE; + use dubp_currency_params::constants::DEFAULT_FORK_WINDOW_SIZE; #[test] fn test_insert_new_head_block() -> Result<(), DALError> { diff --git a/lib/modules/blockchain/blockchain-dal/src/writers/identity.rs b/lib/modules/blockchain/blockchain-dal/src/writers/identity.rs index dabc089d..8db1a90f 100644 --- a/lib/modules/blockchain/blockchain-dal/src/writers/identity.rs +++ b/lib/modules/blockchain/blockchain-dal/src/writers/identity.rs @@ -15,11 +15,11 @@ use crate::entities::identity::{DALIdentity, DALIdentityState}; use crate::{BinDB, DALError, IdentitiesV10Datas, MsExpirV10Datas}; +use dubp_currency_params::CurrencyParameters; use dubp_documents::documents::identity::IdentityDocumentV10; use dubp_documents::Document; use dubp_documents::{BlockNumber, Blockstamp}; use dup_crypto::keys::PubKey; -use dup_currency_params::CurrencyParameters; use durs_common_tools::fatal_error; use durs_wot::NodeId; diff --git a/lib/modules/blockchain/blockchain-dal/src/writers/requests.rs b/lib/modules/blockchain/blockchain-dal/src/writers/requests.rs index 43d7b4e9..1fcb68f9 100644 --- a/lib/modules/blockchain/blockchain-dal/src/writers/requests.rs +++ b/lib/modules/blockchain/blockchain-dal/src/writers/requests.rs @@ -17,12 +17,12 @@ use crate::entities::block::DALBlock; use crate::entities::sources::SourceAmount; use crate::writers::transaction::DALTxV10; use crate::*; +use dubp_currency_params::CurrencyParameters; use dubp_documents::documents::block::{BlockDocument, BlockDocumentTrait}; use dubp_documents::documents::certification::CompactCertificationDocumentV10; use dubp_documents::documents::identity::IdentityDocumentV10; use dubp_documents::Blockstamp; use dup_crypto::keys::PubKey; -use dup_currency_params::CurrencyParameters; use durs_wot::NodeId; use std::ops::Deref; diff --git a/lib/modules/blockchain/blockchain/Cargo.toml b/lib/modules/blockchain/blockchain/Cargo.toml index af7ba0fe..5c2cad60 100644 --- a/lib/modules/blockchain/blockchain/Cargo.toml +++ b/lib/modules/blockchain/blockchain/Cargo.toml @@ -13,7 +13,7 @@ path = "src/lib.rs" dirs = "1.0.2" durs-conf = { path = "../../../core/conf" } dup-crypto = { path = "../../../crypto" } -dup-currency-params = { path = "../../../dubp/currency-params" } +dubp-currency-params = { path = "../../../dubp/currency-params" } durs-blockchain-dal = { path = "../blockchain-dal" } dubp-documents= { path = "../../../dubp/documents" } durs-common-tools = { path = "../../../tools/common-tools" } diff --git a/lib/modules/blockchain/blockchain/src/dbex.rs b/lib/modules/blockchain/blockchain/src/dbex.rs index 46bc3280..ebe8c92b 100644 --- a/lib/modules/blockchain/blockchain/src/dbex.rs +++ b/lib/modules/blockchain/blockchain/src/dbex.rs @@ -172,7 +172,7 @@ pub fn dbex_wot(profile_path: PathBuf, csv: bool, query: &DBExWotQuery) { // Get currency parameters let currency_params_db_datas = - dup_currency_params::db::get_currency_params(durs_conf::get_datas_path(profile_path)) + dubp_currency_params::db::get_currency_params(durs_conf::get_datas_path(profile_path)) .expect("Fail to parse currency params !"); if currency_params_db_datas.is_none() { println!("{}", EMPTY_BLOCKCHAIN); diff --git a/lib/modules/blockchain/blockchain/src/fork/fork_algo.rs b/lib/modules/blockchain/blockchain/src/fork/fork_algo.rs index dbf93d5b..bb422240 100644 --- a/lib/modules/blockchain/blockchain/src/fork/fork_algo.rs +++ b/lib/modules/blockchain/blockchain/src/fork/fork_algo.rs @@ -107,7 +107,7 @@ mod tests { #[test] fn test_fork_resolution_algo() -> Result<(), DALError> { // Get FORK_WINDOW_SIZE value - let fork_window_size = *dup_currency_params::constants::DEFAULT_FORK_WINDOW_SIZE; + let fork_window_size = *dubp_currency_params::constants::DEFAULT_FORK_WINDOW_SIZE; // Open empty databases in memory mode let bc_dbs = BlocksV10DBs::open(None); diff --git a/lib/modules/blockchain/blockchain/src/lib.rs b/lib/modules/blockchain/blockchain/src/lib.rs index 600324c7..34d6c67a 100644 --- a/lib/modules/blockchain/blockchain/src/lib.rs +++ b/lib/modules/blockchain/blockchain/src/lib.rs @@ -54,10 +54,10 @@ pub use crate::dbex::{DBExQuery, DBExTxQuery, DBExWotQuery}; use crate::dubp::apply::ValidBlockApplyReqs; use crate::dubp::*; use crate::fork::*; +use dubp_currency_params::{CurrencyName, CurrencyParameters}; use dubp_documents::documents::block::BlockDocument; use dubp_documents::*; use dup_crypto::keys::*; -use dup_currency_params::{CurrencyName, CurrencyParameters}; use durs_blockchain_dal::*; use durs_common_tools::fatal_error; use durs_message::events::*; @@ -199,7 +199,7 @@ impl BlockchainModule { // Get currency parameters let (currency_name, currency_params) = if let Some((currency_name, currency_params)) = - dup_currency_params::db::get_currency_params(durs_conf::get_datas_path( + dubp_currency_params::db::get_currency_params(durs_conf::get_datas_path( profile_path.clone(), )) .expect("Fatal error : fail to read Blockchain DB !") diff --git a/lib/modules/blockchain/blockchain/src/sync/apply/mod.rs b/lib/modules/blockchain/blockchain/src/sync/apply/mod.rs index f30356cd..227fce99 100644 --- a/lib/modules/blockchain/blockchain/src/sync/apply/mod.rs +++ b/lib/modules/blockchain/blockchain/src/sync/apply/mod.rs @@ -21,10 +21,10 @@ use crate::dubp; use crate::dubp::apply::apply_valid_block; use crate::dubp::apply::ValidBlockApplyReqs; use crate::sync::SyncJobsMess; +use dubp_currency_params::{CurrencyName, CurrencyParameters}; use dubp_documents::documents::block::{BlockDocument, BlockDocumentTrait}; use dubp_documents::{BlockNumber, Blockstamp, Document}; use dup_crypto::keys::PubKey; -use dup_currency_params::{CurrencyName, CurrencyParameters}; use durs_blockchain_dal::writers::requests::WotsDBsWriteQuery; use durs_blockchain_dal::{BinDB, CertsExpirV10Datas, WotsV10DBs}; use durs_common_tools::fatal_error; diff --git a/lib/modules/blockchain/blockchain/src/sync/mod.rs b/lib/modules/blockchain/blockchain/src/sync/mod.rs index e0496e5a..24473a87 100644 --- a/lib/modules/blockchain/blockchain/src/sync/mod.rs +++ b/lib/modules/blockchain/blockchain/src/sync/mod.rs @@ -18,10 +18,10 @@ mod download; use crate::*; use apply::BlockApplicator; +use dubp_currency_params::{CurrencyName, CurrencyParameters}; use dubp_documents::documents::block::BlockDocumentTrait; use dubp_documents::{BlockHash, BlockNumber}; use dup_crypto::keys::*; -use dup_currency_params::{CurrencyName, CurrencyParameters}; use durs_blockchain_dal::writers::requests::*; use durs_blockchain_dal::{open_memory_db, CertsExpirV10Datas}; use durs_common_tools::fatal_error; @@ -302,7 +302,7 @@ pub fn local_sync<DC: DursConfTrait>( ); } else { block_applicator.currency_params = - match dup_currency_params::db::get_currency_params(datas_path) { + match dubp_currency_params::db::get_currency_params(datas_path) { Ok(Some((_currency_name, currency_params))) => Some(currency_params), Ok(None) => { fatal_error!("Params db corrupted: please reset data and resync !") diff --git a/lib/modules/skeleton/Cargo.toml b/lib/modules/skeleton/Cargo.toml index 447f9e7a..f6757caf 100644 --- a/lib/modules/skeleton/Cargo.toml +++ b/lib/modules/skeleton/Cargo.toml @@ -16,7 +16,7 @@ durs-message = { path = "../../core/message" } durs-module = { path = "../../core/module" } durs-network = { path = "../../core/network" } dup-crypto = { path = "../../crypto" } -dup-currency-params = { path = "../../dubp/currency-params" } +dubp-currency-params = { path = "../../dubp/currency-params" } durs-common-tools = { path = "../../tools/common-tools" } failure = "0.1.5" log = "0.4.*" diff --git a/lib/modules/skeleton/lib.rs b/lib/modules/skeleton/lib.rs index f1467b61..01a603b9 100644 --- a/lib/modules/skeleton/lib.rs +++ b/lib/modules/skeleton/lib.rs @@ -34,7 +34,7 @@ extern crate serde_derive; #[macro_use] extern crate structopt; -use dup_currency_params::CurrencyName; +use dubp_currency_params::CurrencyName; use durs_common_tools::fatal_error; use durs_common_tools::traits::merge::Merge; use durs_conf::DuRsConf; diff --git a/lib/modules/tui/Cargo.toml b/lib/modules/tui/Cargo.toml index e3764c8b..8d23e982 100644 --- a/lib/modules/tui/Cargo.toml +++ b/lib/modules/tui/Cargo.toml @@ -12,7 +12,7 @@ path = "lib.rs" [dependencies] durs-conf = { path = "../../core/conf" } dup-crypto = { path = "../../crypto" } -dup-currency-params = { path = "../../dubp/currency-params" } +dubp-currency-params = { path = "../../dubp/currency-params" } dubp-documents= { path = "../../dubp/documents" } durs-common-tools = { path = "../../tools/common-tools" } durs-message = { path = "../../core/message" } diff --git a/lib/modules/tui/lib.rs b/lib/modules/tui/lib.rs index 926f72b3..b75333df 100644 --- a/lib/modules/tui/lib.rs +++ b/lib/modules/tui/lib.rs @@ -35,7 +35,7 @@ extern crate serde_derive; #[macro_use] extern crate structopt; -use dup_currency_params::CurrencyName; +use dubp_currency_params::CurrencyName; use durs_common_tools::fatal_error; use durs_common_tools::traits::merge::Merge; use durs_conf::DuRsConf; diff --git a/lib/modules/ws2p-v1-legacy/Cargo.toml b/lib/modules/ws2p-v1-legacy/Cargo.toml index e862090a..e749c815 100644 --- a/lib/modules/ws2p-v1-legacy/Cargo.toml +++ b/lib/modules/ws2p-v1-legacy/Cargo.toml @@ -17,7 +17,7 @@ durs-conf = { path = "../../core/conf" } durs-module = { path = "../../core/module" } durs-network = { path = "../../core/network" } dup-crypto = { path = "../../crypto" } -dup-currency-params = { path = "../../dubp/currency-params" } +dubp-currency-params = { path = "../../dubp/currency-params" } durs-network-documents = { path = "../../dunp/network-documents" } durs-message = { path = "../../core/message" } durs-common-tools = { path = "../../tools/common-tools" } diff --git a/lib/modules/ws2p-v1-legacy/src/lib.rs b/lib/modules/ws2p-v1-legacy/src/lib.rs index 3b1dcd9d..b57126be 100644 --- a/lib/modules/ws2p-v1-legacy/src/lib.rs +++ b/lib/modules/ws2p-v1-legacy/src/lib.rs @@ -58,11 +58,11 @@ use crate::ws_connections::messages::WS2Pv1Msg; use crate::ws_connections::requests::{WS2Pv1ReqBody, WS2Pv1ReqFullId, WS2Pv1ReqId, WS2Pv1Request}; use crate::ws_connections::states::WS2PConnectionState; use crate::ws_connections::*; +use dubp_currency_params::CurrencyName; use dubp_documents::documents::block::BlockDocument; use dubp_documents::documents::UserDocumentDUBP; use dubp_documents::Blockstamp; use dup_crypto::keys::*; -use dup_currency_params::CurrencyName; use durs_common_tools::fatal_error; use durs_common_tools::traits::merge::Merge; use durs_conf::DuRsConf; diff --git a/lib/modules/ws2p/ws2p-messages/Cargo.toml b/lib/modules/ws2p/ws2p-messages/Cargo.toml index 7d342d20..fea57971 100644 --- a/lib/modules/ws2p/ws2p-messages/Cargo.toml +++ b/lib/modules/ws2p/ws2p-messages/Cargo.toml @@ -13,7 +13,7 @@ path = "lib.rs" bincode = "1.0.*" byteorder = "1.2.3" dup-crypto = { path = "../../../crypto" } -dup-currency-params = { path = "../../../dubp/currency-params" } +dubp-currency-params = { path = "../../../dubp/currency-params" } dubp-documents= { path = "../../../dubp/documents" } durs-network-documents = { path = "../../../dunp/network-documents" } durs-common-tools = { path = "../../../tools/common-tools" } diff --git a/lib/modules/ws2p/ws2p-messages/lib.rs b/lib/modules/ws2p/ws2p-messages/lib.rs index be160b16..1441f460 100644 --- a/lib/modules/ws2p/ws2p-messages/lib.rs +++ b/lib/modules/ws2p/ws2p-messages/lib.rs @@ -166,11 +166,11 @@ mod tests { use crate::v2::WS2Pv2Message; use bincode; use bincode::{deserialize, serialize}; + use dubp_currency_params::CurrencyName; use dubp_documents::documents::certification::*; use dubp_documents::{BlockNumber, Blockstamp}; use dup_crypto::keys::bin_signable::BinSignable; use dup_crypto::keys::*; - use dup_currency_params::CurrencyName; use durs_network_documents::network_endpoint::*; use durs_network_documents::network_peer::*; use durs_network_documents::*; diff --git a/lib/modules/ws2p/ws2p-messages/v2/mod.rs b/lib/modules/ws2p/ws2p-messages/v2/mod.rs index 1bf5cb0b..d7b7a77f 100644 --- a/lib/modules/ws2p/ws2p-messages/v2/mod.rs +++ b/lib/modules/ws2p/ws2p-messages/v2/mod.rs @@ -30,10 +30,10 @@ pub mod secret_flags; use crate::v2::payload_container::*; use crate::WS2PMessage; +use dubp_currency_params::CurrencyName; use dup_crypto::hashs::Hash; use dup_crypto::keys::bin_signable::BinSignable; use dup_crypto::keys::*; -use dup_currency_params::CurrencyName; use durs_network_documents::NodeId; /// WS2P v2 message metadata size diff --git a/lib/modules/ws2p/ws2p-protocol/Cargo.toml b/lib/modules/ws2p/ws2p-protocol/Cargo.toml index b6065611..50df6ef8 100644 --- a/lib/modules/ws2p/ws2p-protocol/Cargo.toml +++ b/lib/modules/ws2p/ws2p-protocol/Cargo.toml @@ -11,7 +11,7 @@ path = "src/lib.rs" [dependencies] dup-crypto = { path = "../../../crypto" } -dup-currency-params = { path = "../../../dubp/currency-params" } +dubp-currency-params = { path = "../../../dubp/currency-params" } durs-common-tools = { path = "../../../tools/common-tools" } dubp-documents= { path = "../../../dubp/documents" } durs-module = { path = "../../../core/module" } diff --git a/lib/modules/ws2p/ws2p-protocol/src/controller/meta_datas.rs b/lib/modules/ws2p/ws2p-protocol/src/controller/meta_datas.rs index 49a28e9d..25166ab3 100644 --- a/lib/modules/ws2p/ws2p-protocol/src/controller/meta_datas.rs +++ b/lib/modules/ws2p/ws2p-protocol/src/controller/meta_datas.rs @@ -17,9 +17,9 @@ use crate::connection_state::WS2PConnectionState; use crate::MySelfWs2pNode; +use dubp_currency_params::CurrencyName; use dubp_documents::Blockstamp; use dup_crypto::hashs::Hash; -use dup_currency_params::CurrencyName; use durs_network_documents::network_peer::PeerCardV11; use durs_network_documents::NodeFullId; use durs_ws2p_messages::v2::api_features::WS2PFeatures; diff --git a/lib/modules/ws2p/ws2p/Cargo.toml b/lib/modules/ws2p/ws2p/Cargo.toml index 8b3aebf5..b7fad259 100644 --- a/lib/modules/ws2p/ws2p/Cargo.toml +++ b/lib/modules/ws2p/ws2p/Cargo.toml @@ -13,7 +13,7 @@ path = "src/lib.rs" bincode = "1.0.*" durs-conf= { path = "../../../core/conf" } dup-crypto = { path = "../../../crypto" } -dup-currency-params = { path = "../../../dubp/currency-params" } +dubp-currency-params = { path = "../../../dubp/currency-params" } dubp-documents= { path = "../../../dubp/documents" } durs-network-documents = { path = "../../../dunp/network-documents" } durs-common-tools = { path = "../../../tools/common-tools" } diff --git a/lib/modules/ws2p/ws2p/src/controllers/incoming_connections.rs b/lib/modules/ws2p/ws2p/src/controllers/incoming_connections.rs index fd65fd49..d3e306d1 100644 --- a/lib/modules/ws2p/ws2p/src/controllers/incoming_connections.rs +++ b/lib/modules/ws2p/ws2p/src/controllers/incoming_connections.rs @@ -17,7 +17,7 @@ use crate::controllers::handler::Ws2pConnectionHandler; use crate::controllers::*; -use dup_currency_params::CurrencyName; +use dubp_currency_params::CurrencyName; use durs_common_tools::fatal_error; use durs_message::DursMsg; use durs_ws2p_messages::v2::connect::WS2Pv2ConnectType; diff --git a/lib/modules/ws2p/ws2p/src/controllers/outgoing_connections.rs b/lib/modules/ws2p/ws2p/src/controllers/outgoing_connections.rs index 7622dc2b..dcabd55e 100644 --- a/lib/modules/ws2p/ws2p/src/controllers/outgoing_connections.rs +++ b/lib/modules/ws2p/ws2p/src/controllers/outgoing_connections.rs @@ -17,7 +17,7 @@ use crate::controllers::handler::Ws2pConnectionHandler; use crate::controllers::*; -use dup_currency_params::CurrencyName; +use dubp_currency_params::CurrencyName; use durs_common_tools::fatal_error; use durs_message::DursMsg; use durs_network_documents::network_endpoint::EndpointEnum; diff --git a/lib/modules/ws2p/ws2p/src/generate_peer.rs b/lib/modules/ws2p/ws2p/src/generate_peer.rs index 748d7839..20de0562 100644 --- a/lib/modules/ws2p/ws2p/src/generate_peer.rs +++ b/lib/modules/ws2p/ws2p/src/generate_peer.rs @@ -16,10 +16,10 @@ //! Generate self peer card use bincode; +use dubp_currency_params::CurrencyName; use dubp_documents::BlockNumber; use dup_crypto::keys::text_signable::TextSignable; use dup_crypto::keys::{KeyPair, KeyPairEnum, SignError}; -use dup_currency_params::CurrencyName; use durs_common_tools::fatal_error; use durs_network_documents::network_endpoint::*; use durs_network_documents::network_peer::*; diff --git a/lib/modules/ws2p/ws2p/src/lib.rs b/lib/modules/ws2p/ws2p/src/lib.rs index 0355f04f..e9d5f71d 100644 --- a/lib/modules/ws2p/ws2p/src/lib.rs +++ b/lib/modules/ws2p/ws2p/src/lib.rs @@ -40,7 +40,7 @@ mod generate_peer; pub mod services; use crate::errors::WS2PError; -use dup_currency_params::CurrencyName; +use dubp_currency_params::CurrencyName; use durs_common_tools::fatal_error; use durs_common_tools::traits::merge::Merge; use durs_conf::DuRsConf; diff --git a/lib/modules/ws2p/ws2p/src/services/outgoing.rs b/lib/modules/ws2p/ws2p/src/services/outgoing.rs index 7615a583..3b5546cb 100644 --- a/lib/modules/ws2p/ws2p/src/services/outgoing.rs +++ b/lib/modules/ws2p/ws2p/src/services/outgoing.rs @@ -17,7 +17,7 @@ use crate::services::WsError; use crate::*; -use dup_currency_params::CurrencyName; +use dubp_currency_params::CurrencyName; use durs_network_documents::{NodeFullId, NodeId}; use durs_ws2p_protocol::connection_state::WS2PConnectionState; use durs_ws2p_protocol::controller::WebsocketActionOrder; diff --git a/lib/modules/ws2p/ws2p/tests/connection_negociation.rs b/lib/modules/ws2p/ws2p/tests/connection_negociation.rs index 75141f64..681a0d4a 100644 --- a/lib/modules/ws2p/ws2p/tests/connection_negociation.rs +++ b/lib/modules/ws2p/ws2p/tests/connection_negociation.rs @@ -13,9 +13,9 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. +use dubp_currency_params::CurrencyName; use dup_crypto::keys::KeyPair; use dup_crypto::keys::*; -use dup_currency_params::CurrencyName; //use durs_common_tests_tools::logger::init_logger_stdout; use durs_message::DursMsg; use durs_network_documents::network_endpoint::*; diff --git a/lib/tests-tools/documents-tests-tools/Cargo.toml b/lib/tests-tools/documents-tests-tools/Cargo.toml index b0e5ae91..fb2c3cee 100644 --- a/lib/tests-tools/documents-tests-tools/Cargo.toml +++ b/lib/tests-tools/documents-tests-tools/Cargo.toml @@ -14,7 +14,7 @@ path = "src/lib.rs" [dependencies] dup-crypto = { path = "../../crypto" } -dup-currency-params = { path = "../../dubp/currency-params" } +dubp-currency-params = { path = "../../dubp/currency-params" } dubp-documents = { path = "../../dubp/documents" } dup-crypto-tests-tools = { path = "../crypto-tests-tools" } diff --git a/lib/tests-tools/documents-tests-tools/src/mocks/mod.rs b/lib/tests-tools/documents-tests-tools/src/mocks/mod.rs index 18a189ae..0856ef94 100644 --- a/lib/tests-tools/documents-tests-tools/src/mocks/mod.rs +++ b/lib/tests-tools/documents-tests-tools/src/mocks/mod.rs @@ -17,10 +17,10 @@ pub mod identity; +use dubp_currency_params::CurrencyName; use dubp_documents::documents::block::{BlockDocument, BlockDocumentV10}; use dubp_documents::*; use dup_crypto::hashs::Hash; -use dup_currency_params::CurrencyName; /// Generate n mock blockstamps pub fn generate_blockstamps(n: usize) -> Vec<Blockstamp> { -- GitLab