AURA: Switch to CurrentSlot instead of LastTimestamp (#8023)

* Convert AURA to new pallet macro

* AURA: Switch to `CurrentSlot` instead of `LastTimestamp`

This switches AURA to use `CurrentSlot` instead of `LastTimestamp`.

* Add missing file

* Update frame/aura/src/migrations.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Remove the runtime side provide inherent code

* Use correct weight

* Add TODO

* Remove the Inherent from AURA

* 🤦

* Remove unused stuff

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
Bastian Köcher
2021-02-03 13:47:13 +01:00
committed by GitHub
parent 26b093ea8a
commit 5569313bd6
8 changed files with 88 additions and 68 deletions
+2 -6
View File
@@ -21,12 +21,8 @@
use crate as pallet_aura;
use sp_consensus_aura::ed25519::AuthorityId;
use sp_runtime::{
traits::IdentityLookup,
testing::{Header, UintAuthorityId},
};
use sp_runtime::{traits::IdentityLookup, testing::{Header, UintAuthorityId}};
use frame_support::{parameter_types, traits::GenesisBuild};
use sp_io;
use sp_core::H256;
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
@@ -40,7 +36,7 @@ frame_support::construct_runtime!(
{
System: frame_system::{Module, Call, Config, Storage, Event<T>},
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
Aura: pallet_aura::{Module, Call, Storage, Config<T>, Inherent},
Aura: pallet_aura::{Module, Call, Storage, Config<T>},
}
);