Skip to content

Commit

Permalink
Tests: Do not restore in reverse state
Browse files Browse the repository at this point in the history
  • Loading branch information
Deniallugo committed Nov 25, 2020
1 parent bc03483 commit c995743
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion core/bin/data_restore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ zksync_contracts = { path = "../../lib/contracts", version = "1.0" }
jsonrpc-core = "14.0.0"
db_test_macro = { path = "../../lib/storage/db_test_macro" }
futures = "0.3.5"
actix-rt = "1.1.1"
23 changes: 13 additions & 10 deletions core/tests/testkit/src/bin/revert_blocks_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,21 @@ async fn execute_blocks_with_new_state_keeper(
.revert_blocks(blocks_committed - blocks_verified)
.await
.expect("revert_blocks call fails");
} else {
// Do not restore in reverting state, because there no working states
println!("Start restoring");

verify_restore(
&testkit_config.web3_url,
testkit_config.available_block_chunk_sizes.clone(),
&contracts,
fee_account_address,
test_setup.get_accounts_state().await,
tokens,
)
.await;
}

verify_restore(
&testkit_config.web3_url,
testkit_config.available_block_chunk_sizes.clone(),
&contracts,
fee_account_address,
test_setup.get_accounts_state().await,
tokens,
)
.await;

stop_state_keeper_sender.send(()).expect("sk stop send");
sk_thread_handle.join().expect("sk thread join");
}
Expand Down

0 comments on commit c995743

Please sign in to comment.