mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-14 17:55:44 +00:00
Parachains-Aura: Only produce once per slot (#3308)
Given how the block production is driven for Parachains right now, with the enabling of async backing we would produce two blocks per slot. Until we have a proper collator implementation, the "hack" is to prevent the production of multiple blocks per slot. Closes: https://github.com/paritytech/polkadot-sdk/issues/3282
This commit is contained in:
@@ -258,6 +258,7 @@ where
|
||||
pub struct SlotClaim<Pub> {
|
||||
author_pub: Pub,
|
||||
pre_digest: DigestItem,
|
||||
slot: Slot,
|
||||
timestamp: Timestamp,
|
||||
}
|
||||
|
||||
@@ -272,7 +273,7 @@ impl<Pub> SlotClaim<Pub> {
|
||||
P::Public: Codec,
|
||||
P::Signature: Codec,
|
||||
{
|
||||
SlotClaim { author_pub, timestamp, pre_digest: aura_internal::pre_digest::<P>(slot) }
|
||||
SlotClaim { author_pub, timestamp, pre_digest: aura_internal::pre_digest::<P>(slot), slot }
|
||||
}
|
||||
|
||||
/// Get the author's public key.
|
||||
@@ -285,6 +286,11 @@ impl<Pub> SlotClaim<Pub> {
|
||||
&self.pre_digest
|
||||
}
|
||||
|
||||
/// Get the slot assigned to this claim.
|
||||
pub fn slot(&self) -> Slot {
|
||||
self.slot
|
||||
}
|
||||
|
||||
/// Get the timestamp corresponding to the relay-chain slot this claim was
|
||||
/// generated against.
|
||||
pub fn timestamp(&self) -> Timestamp {
|
||||
|
||||
Reference in New Issue
Block a user