Commit 87255ace authored by Bastian Köcher's avatar Bastian Köcher Committed by asynchronous rob
Browse files

Make `ParachainContext` take self as mutable (#458)

This replicates changes to `Environment`/`Proposer` that are used
internally at Cumulus.
parent 2feb1d19
Pipeline #53695 failed with stages
in 19 seconds
......@@ -147,7 +147,7 @@ pub trait ParachainContext: Clone {
/// Produce a candidate, given the relay parent hash, the latest ingress queue information
/// and the last parachain head.
fn produce_candidate<I: IntoIterator<Item=(ParaId, Message)>>(
&self,
&mut self,
relay_parent: Hash,
status: ParachainStatus,
ingress: I,
......@@ -174,7 +174,7 @@ pub fn collate<'a, R, P>(
local_id: ParaId,
parachain_status: ParachainStatus,
relay_context: R,
para_context: P,
mut para_context: P,
key: Arc<CollatorPair>,
)
-> impl Future<Item=(parachain::Collation, OutgoingMessages), Error=Error<R::Error>> + 'a
......@@ -489,7 +489,7 @@ mod tests {
type ProduceCandidate = Result<(BlockData, HeadData, OutgoingMessages), InvalidHead>;
fn produce_candidate<I: IntoIterator<Item=(ParaId, Message)>>(
&self,
&mut self,
_relay_parent: Hash,
_status: ParachainStatus,
ingress: I,
......
......@@ -56,7 +56,7 @@ impl ParachainContext for AdderContext {
type ProduceCandidate = Result<(BlockData, HeadData, OutgoingMessages), InvalidHead>;
fn produce_candidate<I: IntoIterator<Item=(ParaId, Message)>>(
&self,
&mut self,
_relay_parent: Hash,
status: ParachainStatus,
ingress: I,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment