Fixes/improvements for disputes (#3753)

* More debugging output.

* Fix chain selection in case of disputes.

* Fix flaky test.
This commit is contained in:
Robert Klotzner
2021-09-01 21:25:56 +02:00
committed by GitHub
parent bff0ed532f
commit ffcde1e5e7
7 changed files with 60 additions and 31 deletions
+4 -2
View File
@@ -383,18 +383,20 @@ async fn test_skeleton(
);
tracing::trace!("determine undisputed chain response: {:?}", undisputed_chain);
let target_block_number = chain.number(target_block_hash).unwrap().unwrap();
assert_matches!(
overseer_recv(
virtual_overseer
).await,
AllMessages::DisputeCoordinator(
DisputeCoordinatorMessage::DetermineUndisputedChain {
base_number: _,
base: _,
block_descriptions: _,
tx,
}
) => {
tx.send(undisputed_chain).unwrap();
tx.send(undisputed_chain.unwrap_or((target_block_number, target_block_hash))).unwrap();
});
}