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

Commit 8dca02a

Browse files
committed
make interface more convenient
1 parent 9628e44 commit 8dca02a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

client/consensus/aura/src/collator.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ where
122122
relay_parent: PHash,
123123
validation_data: &PersistedValidationData,
124124
parent_hash: Block::Hash,
125-
timestamp: Option<Timestamp>,
125+
timestamp: impl Into<Option<Timestamp>>,
126126
) -> Result<(ParachainInherentData, InherentData), Box<dyn Error>> {
127127
let paras_inherent_data = ParachainInherentData::create_at(
128128
relay_parent,
@@ -149,7 +149,7 @@ where
149149
.await
150150
.map_err(Box::new)?;
151151

152-
if let Some(timestamp) = timestamp {
152+
if let Some(timestamp) = timestamp.into() {
153153
other_inherent_data.replace_data(sp_timestamp::INHERENT_IDENTIFIER, &timestamp);
154154
}
155155

@@ -168,12 +168,12 @@ where
168168
&mut self,
169169
parent_header: &Block::Header,
170170
slot_claim: &SlotClaim<P::Public>,
171-
pre_digest: impl Into<Option<Vec<DigestItem>>>,
171+
additional_pre_digest: impl Into<Option<Vec<DigestItem>>>,
172172
inherent_data: (ParachainInherentData, InherentData),
173173
proposal_duration: Duration,
174174
max_pov_size: usize,
175175
) -> Result<(Collation, ParachainBlockData<Block>, Block::Hash), Box<dyn Error>> {
176-
let mut digest = pre_digest.into().unwrap_or_default();
176+
let mut digest = additional_pre_digest.into().unwrap_or_default();
177177
digest.push(slot_claim.pre_digest.clone());
178178

179179
let proposal = self

0 commit comments

Comments
 (0)