Skip to content

Commit c90a324

Browse files
nazar-pcbkchr
andauthored
Make claim_slot take &mut self (paritytech#1225)
Co-authored-by: Bastian Köcher <[email protected]>
1 parent 6a843e9 commit c90a324

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

substrate/client/consensus/aura/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ where
371371
}
372372

373373
async fn claim_slot(
374-
&self,
374+
&mut self,
375375
_header: &B::Header,
376376
slot: Slot,
377377
authorities: &Self::AuxData,
@@ -790,7 +790,7 @@ mod tests {
790790
let client = peer.client().as_client();
791791
let environ = DummyFactory(client.clone());
792792

793-
let worker = AuraWorker {
793+
let mut worker = AuraWorker {
794794
client: client.clone(),
795795
block_import: client,
796796
env: environ,

substrate/client/consensus/babe/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -723,12 +723,12 @@ where
723723
B: BlockT,
724724
C: ProvideRuntimeApi<B> + HeaderBackend<B> + HeaderMetadata<B, Error = ClientError>,
725725
C::Api: BabeApi<B>,
726-
E: Environment<B, Error = Error> + Sync,
726+
E: Environment<B, Error = Error> + Send + Sync,
727727
E::Proposer: Proposer<B, Error = Error>,
728728
I: BlockImport<B> + Send + Sync + 'static,
729729
SO: SyncOracle + Send + Clone + Sync,
730730
L: sc_consensus::JustificationSyncLink<B>,
731-
BS: BackoffAuthoringBlocksStrategy<NumberFor<B>> + Sync,
731+
BS: BackoffAuthoringBlocksStrategy<NumberFor<B>> + Send + Sync,
732732
Error: std::error::Error + Send + From<ConsensusError> + From<I::Error> + 'static,
733733
{
734734
type Claim = (PreDigest, AuthorityId);
@@ -769,7 +769,7 @@ where
769769
}
770770

771771
async fn claim_slot(
772-
&self,
772+
&mut self,
773773
_parent_header: &B::Header,
774774
slot: Slot,
775775
epoch_descriptor: &ViableEpochDescriptor<B::Hash, NumberFor<B>, Epoch>,

substrate/client/consensus/slots/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pub trait SimpleSlotWorker<B: BlockT> {
126126

127127
/// Tries to claim the given slot, returning an object with claim data if successful.
128128
async fn claim_slot(
129-
&self,
129+
&mut self,
130130
header: &B::Header,
131131
slot: Slot,
132132
aux_data: &Self::AuxData,

0 commit comments

Comments
 (0)