Use same fmt and clippy configs as in Polkadot (#3004)

* Copy rustfmt.toml from Polkadot master

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Format with new config

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add Polkadot clippy config

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update Cargo.lock

Looks like https://github.com/paritytech/polkadot/pull/7611 did not
correctly update the lockfile. Maybe a different Rust Version?!

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2023-08-14 22:30:12 +02:00
committed by GitHub
parent 61480a1881
commit 6c79b58567
60 changed files with 333 additions and 233 deletions
+8 -8
View File
@@ -16,14 +16,14 @@
//! Cumulus timestamp related primitives.
//!
//! Provides a [`InherentDataProvider`] that should be used in the validation phase of the parachain.
//! It will be used to create the inherent data and that will be used to check the inherents inside
//! the parachain block (in this case the timestamp inherent). As we don't have access to any clock
//! from the runtime the timestamp is always passed as an inherent into the runtime. To check this
//! inherent when validating the block, we will use the relay chain slot. As the relay chain slot
//! is derived from a timestamp, we can easily convert it back to a timestamp by muliplying it with
//! the slot duration. By comparing the relay chain slot derived timestamp with the timestamp we can
//! ensure that the parachain timestamp is reasonable.
//! Provides a [`InherentDataProvider`] that should be used in the validation phase of the
//! parachain. It will be used to create the inherent data and that will be used to check the
//! inherents inside the parachain block (in this case the timestamp inherent). As we don't have
//! access to any clock from the runtime the timestamp is always passed as an inherent into the
//! runtime. To check this inherent when validating the block, we will use the relay chain slot. As
//! the relay chain slot is derived from a timestamp, we can easily convert it back to a timestamp
//! by muliplying it with the slot duration. By comparing the relay chain slot derived timestamp
//! with the timestamp we can ensure that the parachain timestamp is reasonable.
#![cfg_attr(not(feature = "std"), no_std)]