Skip to content

Commit

Permalink
Make claim_slot take &mut self (#1225)
Browse files Browse the repository at this point in the history
Co-authored-by: Bastian Köcher <git@kchr.de>
  • Loading branch information
nazar-pc and bkchr authored Aug 29, 2023
1 parent 0400ed9 commit b728724
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions substrate/client/consensus/aura/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ where
}

async fn claim_slot(
&self,
&mut self,
_header: &B::Header,
slot: Slot,
authorities: &Self::AuxData,
Expand Down Expand Up @@ -790,7 +790,7 @@ mod tests {
let client = peer.client().as_client();
let environ = DummyFactory(client.clone());

let worker = AuraWorker {
let mut worker = AuraWorker {
client: client.clone(),
block_import: client,
env: environ,
Expand Down
6 changes: 3 additions & 3 deletions substrate/client/consensus/babe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -723,12 +723,12 @@ where
B: BlockT,
C: ProvideRuntimeApi<B> + HeaderBackend<B> + HeaderMetadata<B, Error = ClientError>,
C::Api: BabeApi<B>,
E: Environment<B, Error = Error> + Sync,
E: Environment<B, Error = Error> + Send + Sync,
E::Proposer: Proposer<B, Error = Error>,
I: BlockImport<B> + Send + Sync + 'static,
SO: SyncOracle + Send + Clone + Sync,
L: sc_consensus::JustificationSyncLink<B>,
BS: BackoffAuthoringBlocksStrategy<NumberFor<B>> + Sync,
BS: BackoffAuthoringBlocksStrategy<NumberFor<B>> + Send + Sync,
Error: std::error::Error + Send + From<ConsensusError> + From<I::Error> + 'static,
{
type Claim = (PreDigest, AuthorityId);
Expand Down Expand Up @@ -769,7 +769,7 @@ where
}

async fn claim_slot(
&self,
&mut self,
_parent_header: &B::Header,
slot: Slot,
epoch_descriptor: &ViableEpochDescriptor<B::Hash, NumberFor<B>, Epoch>,
Expand Down
2 changes: 1 addition & 1 deletion substrate/client/consensus/slots/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub trait SimpleSlotWorker<B: BlockT> {

/// Tries to claim the given slot, returning an object with claim data if successful.
async fn claim_slot(
&self,
&mut self,
header: &B::Header,
slot: Slot,
aux_data: &Self::AuxData,
Expand Down

0 comments on commit b728724

Please sign in to comment.