Skip to content

Commit 8c4c94f

Browse files
Erigara6r1d
authored andcommitted
[feature] #1915: Implement Fast kura init mode
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
1 parent 4c7ef1f commit 8c4c94f

File tree

2 files changed

+268
-67
lines changed

2 files changed

+268
-67
lines changed

core/benches/kura.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use iroha_crypto::KeyPair;
1414
use iroha_data_model::{
1515
block::VersionedCommittedBlock, prelude::*, transaction::TransactionLimits,
1616
};
17-
use iroha_version::scale::EncodeVersioned;
1817
use tokio::{fs, runtime::Runtime};
1918

2019
async fn measure_block_size_for_n_validators(n_validators: u32) {
@@ -62,10 +61,7 @@ async fn measure_block_size_for_n_validators(n_validators: u32) {
6261
let mut block_store = BlockStore::new(dir.path(), LockStatus::Unlocked);
6362
block_store.create_files_if_they_do_not_exist().unwrap();
6463

65-
let serialized_block: Vec<u8> = block.encode_versioned();
66-
block_store
67-
.append_block_to_chain(&serialized_block)
68-
.unwrap();
64+
block_store.append_block_to_chain(&block).unwrap();
6965

7066
let metadata = fs::metadata(dir.path().join("blocks.data")).await.unwrap();
7167
let file_size = Byte::from_bytes(u128::from(metadata.len())).get_appropriate_unit(false);

0 commit comments

Comments
 (0)