Skip to content

Commit

Permalink
Fix block_revert and data_restore crates
Browse files Browse the repository at this point in the history
  • Loading branch information
popzxc committed Mar 28, 2022
1 parent cdb1195 commit cfa54ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/bin/block_revert/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
6 changes: 3 additions & 3 deletions core/bin/data_restore/src/database_storage_interactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand All @@ -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");
Expand Down

0 comments on commit cfa54ca

Please sign in to comment.