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

Commit f70fcf1

Browse files
committed
fmt
1 parent b17694a commit f70fcf1

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

client/consensus/aura/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ pub use import_queue::{build_verifier, import_queue, BuildVerifierParams, Import
5050
pub use sc_consensus_aura::{slot_duration, AuraVerifier, BuildAuraWorkerParams, SlotProportion};
5151
pub use sc_consensus_slots::InherentDataProviderExt;
5252

53+
pub mod collator;
5354
pub mod unstable_reimpl;
5455

5556
const LOG_TARGET: &str = "aura::cumulus";

client/consensus/aura/src/unstable_reimpl.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
2525
use codec::{Decode, Encode};
2626
use cumulus_client_collator::service::ServiceInterface as CollatorServiceInterface;
27-
use cumulus_client_consensus_common::{ParachainBlockImportMarker, ParachainCandidate, ParentSearchParams};
27+
use cumulus_client_consensus_common::{
28+
ParachainBlockImportMarker, ParachainCandidate, ParentSearchParams,
29+
};
2830
use cumulus_client_consensus_proposer::ProposerInterface;
2931
use cumulus_primitives_core::{
3032
relay_chain::Hash as PHash, CollectCollationInfo, PersistedValidationData,
@@ -133,13 +135,14 @@ pub async fn run_async_backing_driven<Block, P, BI, CIDP, Client, RClient, SO, P
133135
};
134136

135137
// TODO [now]: remove this in favor of one passed in as a parameter.
136-
let fake_hack: sc_client_api::in_mem::Blockchain::<Block> = unimplemented!();
138+
let fake_hack: sc_client_api::in_mem::Blockchain<Block> = unimplemented!();
137139

138140
let potential_parents = cumulus_client_consensus_common::find_potential_parents::<Block>(
139141
parent_search_params,
140142
&fake_hack, // sp_blockchain::Backend
141143
&params.relay_client,
142-
).await;
144+
)
145+
.await;
143146

144147
let mut potential_parents = match potential_parents {
145148
Err(e) => {
@@ -150,8 +153,8 @@ pub async fn run_async_backing_driven<Block, P, BI, CIDP, Client, RClient, SO, P
150153
"Could not fetch potential parents to build upon"
151154
);
152155

153-
continue;
154-
}
156+
continue
157+
},
155158
Ok(x) => x,
156159
};
157160

@@ -170,11 +173,9 @@ pub async fn run_async_backing_driven<Block, P, BI, CIDP, Client, RClient, SO, P
170173
}
171174
}
172175

173-
fn can_build_upon<Block: BlockT, Client>(
174-
block_hash: Block::Hash,
175-
client: &Client,
176-
) -> bool where
177-
Client: ProvideRuntimeApi<Block>
176+
fn can_build_upon<Block: BlockT, Client>(block_hash: Block::Hash, client: &Client) -> bool
177+
where
178+
Client: ProvideRuntimeApi<Block>,
178179
{
179180
// TODO [now]: claim slot, maybe with an authorities cache to avoid
180181
// all validators doing this every new relay-chain block.
@@ -284,7 +285,8 @@ pub async fn run_bare_relay_driven<Block, P, BI, CIDP, Client, RClient, SO, Prop
284285
);
285286

286287
let proposal = try_request!(
287-
params.proposer
288+
params
289+
.proposer
288290
.propose(
289291
&parent_header,
290292
&parachain_inherent_data,

0 commit comments

Comments
 (0)