Remove the timestamp pallet

It was needed for contracts, which has since been removed. We now no longer
need it.
This commit is contained in:
Luke Parker
2023-01-04 23:09:58 -05:00
parent e979883f2d
commit daa88a051f
6 changed files with 5 additions and 27 deletions

View File

@@ -27,7 +27,6 @@ sp-application-crypto = { git = "https://github.com/serai-dex/substrate" }
sp-keystore = { git = "https://github.com/serai-dex/substrate" }
sp-keyring = { git = "https://github.com/serai-dex/substrate" }
sp-inherents = { git = "https://github.com/serai-dex/substrate" }
sp-timestamp = { git = "https://github.com/serai-dex/substrate" }
sp-runtime = { git = "https://github.com/serai-dex/substrate" }
sp-blockchain = { git = "https://github.com/serai-dex/substrate" }
sp-api = { git = "https://github.com/serai-dex/substrate" }

View File

@@ -1,8 +1,8 @@
use std::{sync::Arc, time::Duration};
use std::sync::Arc;
use sp_core::{Encode, Pair};
use sp_keyring::Sr25519Keyring;
use sp_inherents::{InherentData, InherentDataProvider};
use sp_inherents::InherentData;
use sp_runtime::OpaqueExtrinsic;
@@ -87,11 +87,5 @@ pub fn create_benchmark_extrinsic(
}
pub fn inherent_benchmark_data() -> Result<InherentData> {
let mut inherent_data = InherentData::new();
futures::executor::block_on(
sp_timestamp::InherentDataProvider::new(Duration::from_millis(0).into())
.provide_inherent_data(&mut inherent_data),
)
.map_err(|e| format!("creating inherent data: {e:?}"))?;
Ok(inherent_data)
Ok(InherentData::new())
}

View File

@@ -57,13 +57,13 @@ impl NativeExecutionDispatch for ExecutorDispatch {
pub struct Cidp;
#[async_trait::async_trait]
impl CreateInherentDataProviders<Block, ()> for Cidp {
type InherentDataProviders = (sp_timestamp::InherentDataProvider,);
type InherentDataProviders = ();
async fn create_inherent_data_providers(
&self,
_: <Block as BlockTrait>::Hash,
_: (),
) -> Result<Self::InherentDataProviders, Box<dyn Send + Sync + Error>> {
Ok((sp_timestamp::InherentDataProvider::from_system_time(),))
Ok(())
}
}