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
@@ -434,7 +434,7 @@ where
overseer
.send_msg(
DisputeCoordinatorMessage::DetermineUndisputedChain {
base_number: target_number,
base: (target_number, target_hash),
block_descriptions: subchain_block_descriptions,
tx,
},
@@ -444,8 +444,7 @@ where
let (subchain_number, subchain_head) = rx
.await
.map_err(Error::OverseerDisconnected)
.map_err(|e| ConsensusError::Other(Box::new(e)))?
.unwrap_or_else(|| (subchain_number, subchain_head));
.map_err(|e| ConsensusError::Other(Box::new(e)))?;
// The the total lag accounting for disputes.
let lag_disputes = initial_leaf_number.saturating_sub(subchain_number);