diff --git a/Cargo.toml b/Cargo.toml index 8686b18..94b6377 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,25 +31,25 @@ url = "2.4.0" [dependencies.iroha_client] git = "https://github.com/hyperledger/iroha.git" - branch = "iroha2-stable-rc19" - version = "2.0.0-pre-rc.19" + branch = "iroha2-dev" + version = "2.0.0-pre-rc.20" [dependencies.iroha_data_model] git = "https://github.com/hyperledger/iroha.git" - branch = "iroha2-stable-rc19" - version = "2.0.0-pre-rc.19" + branch = "iroha2-dev" + version = "2.0.0-pre-rc.20" [dependencies.iroha_config] git = "https://github.com/hyperledger/iroha.git" - branch = "iroha2-stable-rc19" - version = "2.0.0-pre-rc.19" + branch = "iroha2-dev" + version = "2.0.0-pre-rc.20" [dependencies.iroha_crypto] git = "https://github.com/hyperledger/iroha.git" - branch = "iroha2-stable-rc19" - version = "2.0.0-pre-rc.19" + branch = "iroha2-dev" + version = "2.0.0-pre-rc.20" [dependencies.iroha_primitives] git = "https://github.com/hyperledger/iroha.git" - branch = "iroha2-stable-rc19" - version = "2.0.0-pre-rc.19" + branch = "iroha2-dev" + version = "2.0.0-pre-rc.20" diff --git a/src/async_client/client.rs b/src/async_client/client.rs index 2fe44b7..00607de 100644 --- a/src/async_client/client.rs +++ b/src/async_client/client.rs @@ -24,7 +24,7 @@ impl Client { #[allow(dead_code)] pub async fn submit( &self, - instruction: impl Into + Debug, + instruction: impl Into + Debug, ) -> Result> { let isi = instruction.into(); self.submit_all([isi]).await @@ -32,7 +32,7 @@ impl Client { pub async fn submit_all( &self, - instructions: impl IntoIterator, + instructions: impl IntoIterator, ) -> Result> { self.submit_all_with_metadata(instructions, UnlimitedMetadata::new()) .await @@ -41,7 +41,7 @@ impl Client { #[allow(dead_code)] pub async fn submit_with_metadata( &self, - instruction: InstructionBox, + instruction: InstructionExpr, metadata: UnlimitedMetadata, ) -> Result> { self.submit_all_with_metadata([instruction], metadata).await @@ -49,7 +49,7 @@ impl Client { pub async fn submit_all_with_metadata( &self, - instructions: impl IntoIterator, + instructions: impl IntoIterator, metadata: UnlimitedMetadata, ) -> Result> { self.submit_transaction( @@ -61,7 +61,7 @@ impl Client { pub async fn submit_transaction( &self, - transaction: VersionedSignedTransaction, + transaction: SignedTransaction, ) -> Result> { self.iroha_client.submit_transaction(&transaction) } @@ -69,14 +69,14 @@ impl Client { #[allow(dead_code)] pub async fn submit_blocking( &self, - instruction: impl Into, + instruction: impl Into, ) -> Result { self.submit_all_blocking(vec![instruction.into()]).await } pub async fn submit_all_blocking( &self, - instructions: impl IntoIterator, + instructions: impl IntoIterator, ) -> Result { self.submit_all_blocking_with_metadata(instructions, UnlimitedMetadata::new()) .await @@ -84,7 +84,7 @@ impl Client { pub async fn submit_all_blocking_with_metadata( &self, - instructions: impl IntoIterator, + instructions: impl IntoIterator, metadata: UnlimitedMetadata, ) -> Result { let transaction = self @@ -95,7 +95,7 @@ impl Client { pub async fn submit_transaction_blocking( &self, - transaction: VersionedSignedTransaction, + transaction: SignedTransaction, ) -> Result { let iroha_client = self.iroha_client.clone(); let (event_sender, mut event_receiver) = mpsc::unbounded_channel(); @@ -121,7 +121,7 @@ impl Client { } PipelineStatus::Committed => { return event_sender - .send(SubmitBlockingStatus::Committed(hash.transmute())) + .send(SubmitBlockingStatus::Committed(hash)) .expect("Failed to send the transaction through event channel.") } } @@ -146,7 +146,7 @@ impl Client { #[derive(Debug)] pub enum SubmitBlockingStatus { - Committed(HashOf), + Committed(HashOf), Rejected(PipelineRejectionReason), Unknown, } diff --git a/src/commands/daemon.rs b/src/commands/daemon.rs index df4d389..6d29ede 100644 --- a/src/commands/daemon.rs +++ b/src/commands/daemon.rs @@ -10,7 +10,7 @@ use hyper::{ }; use iroha_client::client::Client; use iroha_config::client::Configuration; -use iroha_data_model::{isi::InstructionBox, prelude::*}; +use iroha_data_model::{isi::InstructionExpr, prelude::*}; use std::{ collections::HashMap, fs::File, @@ -233,7 +233,7 @@ fn submit_empty_transactions( } let start_time = Instant::now(); client - .submit_all(Vec::::new().into_iter()) + .submit_all(Vec::::new().into_iter()) .expect("Failed to submit empty ISI"); status .write() diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 5de6831..06d782f 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -13,7 +13,7 @@ fn make_instruction_by_operation( test_account_id: AccountId, test_domain_id: DomainId, index: usize, -) -> Vec { +) -> Vec { match op { Operation::RegisterAccount => { let new_account_name = Name::from_str(format!("alice{}", index).as_str()) @@ -22,13 +22,13 @@ fn make_instruction_by_operation( let (public_key, _) = KeyPair::generate() .expect("Failed to create a new key pair") .into(); - vec![RegisterBox::new(Account::new(new_account_id, [public_key])).into()] + vec![RegisterExpr::new(Account::new(new_account_id, [public_key])).into()] } Operation::RegisterDomain => { let new_domain_name = Name::from_str(format!("wonderland{}", index).as_str()) .expect("Failed to create a new domain name"); let new_domain_id: DomainId = DomainId::new(new_domain_name); - vec![RegisterBox::new(Domain::new(new_domain_id)).into()] + vec![RegisterExpr::new(Domain::new(new_domain_id)).into()] } Operation::RegisterAssetQuantity => { let new_asset_name = Name::from_str(format!("rose_quantity{}", index).as_str()) @@ -45,8 +45,8 @@ fn make_instruction_by_operation( AssetValue::Quantity(random()), ); vec![ - RegisterBox::new(new_asset_definition).into(), - RegisterBox::new(new_asset).into(), + RegisterExpr::new(new_asset_definition).into(), + RegisterExpr::new(new_asset).into(), ] } Operation::RegisterAssetBigQuantity => { @@ -64,8 +64,8 @@ fn make_instruction_by_operation( AssetValue::BigQuantity(random()), ); vec![ - RegisterBox::new(new_asset_definition).into(), - RegisterBox::new(new_asset).into(), + RegisterExpr::new(new_asset_definition).into(), + RegisterExpr::new(new_asset).into(), ] } Operation::RegisterAssetFixed => { @@ -82,8 +82,8 @@ fn make_instruction_by_operation( AssetValue::Fixed(Fixed::try_from(random::()).expect("Valid fixed num")), ); vec![ - RegisterBox::new(new_asset_definition).into(), - RegisterBox::new(new_asset).into(), + RegisterExpr::new(new_asset_definition).into(), + RegisterExpr::new(new_asset).into(), ] } Operation::RegisterAssetStore => { @@ -109,8 +109,8 @@ fn make_instruction_by_operation( AssetValue::Store(store), ); vec![ - RegisterBox::new(new_asset_definition).into(), - RegisterBox::new(new_asset).into(), + RegisterExpr::new(new_asset_definition).into(), + RegisterExpr::new(new_asset).into(), ] } Operation::TransferAsset => { @@ -144,11 +144,11 @@ fn make_instruction_by_operation( Asset::new(new_recipient_asset_id.clone(), AssetValue::Quantity(0)); vec![ - RegisterBox::new(new_asset_definition).into(), - RegisterBox::new(new_sender_asset).into(), - RegisterBox::new(new_recipient_account).into(), - RegisterBox::new(new_recipient_asset).into(), - TransferBox::new( + RegisterExpr::new(new_asset_definition).into(), + RegisterExpr::new(new_sender_asset).into(), + RegisterExpr::new(new_recipient_account).into(), + RegisterExpr::new(new_recipient_asset).into(), + TransferExpr::new( IdBox::AssetId(new_sender_asset_id), 1_u32, IdBox::AssetId(new_recipient_asset_id), @@ -176,10 +176,10 @@ fn make_instruction_by_operation( let new_account = Account::new(new_account_id, [public_key]); vec![ - RegisterBox::new(new_asset_definition).into(), - RegisterBox::new(new_asset).into(), - RegisterBox::new(new_account).into(), - MintBox::new(1_u32, IdBox::AssetId(new_asset_id)).into(), + RegisterExpr::new(new_asset_definition).into(), + RegisterExpr::new(new_asset).into(), + RegisterExpr::new(new_account).into(), + MintExpr::new(1_u32, IdBox::AssetId(new_asset_id)).into(), ] } }