Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Make ParachainContext take self as mutable (#458)
Browse files Browse the repository at this point in the history
This replicates changes to `Environment`/`Proposer` that are used
internally at Cumulus.
  • Loading branch information
bkchr authored and rphmeier committed Oct 8, 2019
1 parent 2feb1d1 commit 87255ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions collator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion test-parachains/adder/collator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 87255ac

Please sign in to comment.