Skip to content

Commit

Permalink
Fix unit test and integration test for test_accept_block and SyncChurn
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Aug 4, 2024
1 parent 5233b91 commit d895209
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions sync/src/relayer/tests/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ pub(crate) fn build_chain(tip: BlockNumber) -> (Relayer, OutPoint) {

let chain_controller = start_chain_services(pack.take_chain_services_builder());

while chain_controller.is_verifying_unverified_blocks_on_startup() {
std::thread::sleep(std::time::Duration::from_millis(10));
}

// Build 1 ~ (tip-1) heights
for i in 0..tip {
let parent = shared
Expand Down
4 changes: 3 additions & 1 deletion test/src/specs/sync/sync_churn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ impl Spec for SyncChurn {
node.stop();
node.start();
}
restart_stopped_tx.send(()).unwrap();
if let Err(err) = restart_stopped_tx.send(()) {
info!("Restart thread has exited already: {:?}", err);
}
});

mining_thread.join().unwrap();
Expand Down

0 comments on commit d895209

Please sign in to comment.