change ActiveLeaves to contain at most one activated (#3525)

* change ActiveLeaves to contain at most one activated

* fix test
This commit is contained in:
Andronik Ordian
2021-07-27 16:45:15 +02:00
committed by GitHub
parent 6519ba987c
commit e1be821fe1
14 changed files with 183 additions and 259 deletions
@@ -615,16 +615,14 @@ async fn activate_leaf(
handle.send(FromOverseer::Signal(
OverseerSignal::ActiveLeaves(
ActiveLeavesUpdate {
activated: [ActivatedLeaf {
hash: activate,
number: 10,
status: LeafStatus::Fresh,
span: Arc::new(Span::Disabled),
}][..]
.into(),
activated: Some(ActivatedLeaf {
hash: activate,
number: 10,
status: LeafStatus::Fresh,
span: Arc::new(Span::Disabled),
}),
deactivated: deactivate.into_iter().collect(),
}
)))
.await;
assert_matches!(