Update Substrate & Polkadot (#540)

This commit is contained in:
Bastian Köcher
2021-07-20 16:11:56 +02:00
committed by GitHub
parent b89037bd82
commit 594f2f4347
18 changed files with 680 additions and 532 deletions
@@ -18,7 +18,7 @@ use sp_runtime::traits::Block as BlockT;
use polkadot_node_primitives::AvailableData;
use polkadot_node_subsystem::messages::AvailabilityRecoveryMessage;
use polkadot_overseer::OverseerHandler;
use polkadot_overseer::Handle as OverseerHandle;
use futures::{channel::oneshot, stream::FuturesUnordered, Future, FutureExt, StreamExt};
@@ -34,15 +34,15 @@ pub(crate) struct ActiveCandidateRecovery<Block: BlockT> {
>,
/// The block hashes of the candidates currently being recovered.
candidates: HashSet<Block::Hash>,
overseer_handler: OverseerHandler,
overseer_handle: OverseerHandle,
}
impl<Block: BlockT> ActiveCandidateRecovery<Block> {
pub fn new(overseer_handler: OverseerHandler) -> Self {
pub fn new(overseer_handle: OverseerHandle) -> Self {
Self {
recoveries: Default::default(),
candidates: Default::default(),
overseer_handler,
overseer_handle,
}
}
@@ -54,7 +54,7 @@ impl<Block: BlockT> ActiveCandidateRecovery<Block> {
) {
let (tx, rx) = oneshot::channel();
self.overseer_handler
self.overseer_handle
.send_msg(
AvailabilityRecoveryMessage::RecoverAvailableData(
pending_candidate.receipt,
+4 -3
View File
@@ -54,7 +54,7 @@ use sp_runtime::{
};
use polkadot_node_primitives::{AvailableData, POV_BOMB_LIMIT};
use polkadot_overseer::OverseerHandler;
use polkadot_overseer::Handle as OverseerHandle;
use polkadot_primitives::v1::{
Block as PBlock, CandidateReceipt, CommittedCandidateReceipt, Id as ParaId, ParachainHost,
SessionIndex,
@@ -117,7 +117,7 @@ where
{
/// Create a new instance.
pub fn new(
overseer_handler: OverseerHandler,
overseer_handle: OverseerHandle,
relay_chain_slot_duration: Duration,
parachain_client: Arc<PC>,
parachain_import_queue: IQ,
@@ -127,7 +127,7 @@ where
Self {
pending_candidates: HashMap::new(),
next_candidate_to_recover: Default::default(),
active_candidate_recovery: ActiveCandidateRecovery::new(overseer_handler),
active_candidate_recovery: ActiveCandidateRecovery::new(overseer_handle),
relay_chain_slot_duration,
waiting_for_parent: HashMap::new(),
parachain_client,
@@ -354,6 +354,7 @@ where
origin: None,
skip_execution: false,
state: None,
indexed_body: None,
});
if let Some(waiting) = self.waiting_for_parent.remove(&block_hash) {