proposer: wait for a hash to be in the active-leaves set (#1616)

* overseer: add ExternalRequest to Event

* proposer: wait for the hash to be activated

* update comments

* overseer: handle unbounded growth of listeners map

* overseer: fix compilation

* overseer: clean up dead listeners

* overseer: cosmetic changes

* overseer: cosmetic changes t.2

* overseer: add debug_assertions

* overseer: fix formatting
This commit is contained in:
Andronik Ordian
2020-08-20 15:43:36 +02:00
committed by GitHub
parent 222520acc5
commit 8eecdd61b8
2 changed files with 110 additions and 40 deletions
+4
View File
@@ -119,6 +119,10 @@ where
let mut provisioner_inherent_data = async move {
let (sender, receiver) = futures::channel::oneshot::channel();
overseer.wait_for_activation(parent_header_hash, sender).await?;
receiver.await.map_err(Error::ClosedChannelFromProvisioner)?;
let (sender, receiver) = futures::channel::oneshot::channel();
// strictly speaking, we don't _have_ to .await this send_msg before opening the
// receiver; it's possible that the response there would be ready slightly before
// this call completes. IMO it's not worth the hassle or overhead of spawning a