From cfa54ca421115f06da1a2e608dd34bca022a4d8c Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Mon, 28 Mar 2022 15:00:31 +0300 Subject: [PATCH] Fix block_revert and data_restore crates --- core/bin/block_revert/src/main.rs | 2 +- core/bin/data_restore/src/database_storage_interactor.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/bin/block_revert/src/main.rs b/core/bin/block_revert/src/main.rs index 16b8267134..b9ead8d12e 100644 --- a/core/bin/block_revert/src/main.rs +++ b/core/bin/block_revert/src/main.rs @@ -45,7 +45,7 @@ async fn revert_blocks_in_storage( println!("`pending_block` table is cleaned"); transaction .chain() - .block_schema() + .tree_cache_schema_bincode() .remove_new_account_tree_cache(last_block) .await?; println!("`account_tree_cache` table is cleaned"); diff --git a/core/bin/data_restore/src/database_storage_interactor.rs b/core/bin/data_restore/src/database_storage_interactor.rs index 4cf990c76b..ead3820739 100644 --- a/core/bin/data_restore/src/database_storage_interactor.rs +++ b/core/bin/data_restore/src/database_storage_interactor.rs @@ -350,7 +350,7 @@ impl<'a> DatabaseStorageInteractor<'a> { let tree_cache = self .storage .chain() - .block_schema() + .tree_cache_schema_json() .get_account_tree_cache_block(last_block) .await .expect("Failed to query the database for the tree cache"); @@ -390,7 +390,7 @@ impl<'a> DatabaseStorageInteractor<'a> { transaction .chain() - .block_schema() + .tree_cache_schema_json() .remove_old_account_tree_cache(block_number) .await .expect("Failed to remove old tree cache"); @@ -399,7 +399,7 @@ impl<'a> DatabaseStorageInteractor<'a> { // since on conflict it does nothing. transaction .chain() - .block_schema() + .tree_cache_schema_json() .store_account_tree_cache(block_number, tree_cache) .await .expect("Failed to store new tree cache");