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

Make ParachainContext take self as mutable #458

Merged
merged 1 commit into from
Oct 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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