Skip to content

Commit

Permalink
[feature] hyperledger#3027: implement lockfile for Kura
Browse files Browse the repository at this point in the history
Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
  • Loading branch information
Artemii Gerasimovich committed Dec 22, 2022
1 parent ce75019 commit edbcf95
Show file tree
Hide file tree
Showing 4 changed files with 269 additions and 96 deletions.
1 change: 1 addition & 0 deletions client/tests/integration/restart_peer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ fn restarted_peer_should_have_the_same_asset_amount() -> Result<()> {
.find(|asset| asset.id().definition_id == asset_definition_id)
.expect("Asset not found");
assert_eq!(AssetValue::Quantity(quantity), *asset.value());
peer.stop();
}

{
Expand Down
4 changes: 3 additions & 1 deletion core/benches/kura.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ async fn measure_block_size_for_n_validators(n_validators: u32) {
.unwrap();
}
let block: VersionedCommittedBlock = block.commit_unchecked().into();
let mut block_store = BlockStore::new(dir.path());
let mut block_store = BlockStore::new(dir.path())
.lock()
.expect("Failed to lock store");
block_store.create_files_if_they_do_not_exist().unwrap();

let serialized_block: Vec<u8> = block.encode_versioned();
Expand Down
Loading

0 comments on commit edbcf95

Please sign in to comment.