Move Externalities into its own crate (#3775)

* Move `Externalities` into `substrate-externalities`

- `Externalities` now support generic extensions
- Split of `primtives-storage` for storage primitive types

* Move the externalities scoping into `substrate-externalities`

* Fix compilation

* Review feedback

* Adds macro for declaring extensions

* Fix benchmarks

* Introduce `ExtensionStore` trait

* Last review comments

* Implement it for `ExtensionStore`
This commit is contained in:
Bastian Köcher
2019-10-09 15:50:30 +02:00
committed by GitHub
parent 984c6ac839
commit 8a39be474e
95 changed files with 1600 additions and 1420 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ use std::collections::HashSet;
use ref_thread_local::{ref_thread_local, RefThreadLocal};
use sr_primitives::testing::Header;
use sr_primitives::Perbill;
use primitives::{H256, Blake2Hasher};
use primitives::H256;
use support::{impl_outer_origin, parameter_types};
use {runtime_io, system};
use crate::{GenesisConfig, Module, Trait, IsDeadAccount, OnNewAccount, ResolveHint};
@@ -96,7 +96,7 @@ impl Trait for Runtime {
type Event = ();
}
pub fn new_test_ext() -> runtime_io::TestExternalities<Blake2Hasher> {
pub fn new_test_ext() -> runtime_io::TestExternalities {
{
let mut h = ALIVE.borrow_mut();
h.clear();