Offchain execution extensions (#4145)

* Pass Extensions instead of individual objects.

* Move TransactionPool to a separate ExternalitiesExtension.

* Fix compilation.?

* Clean up.

* Refactor testing utilities.

* Add docs, fix tests.

* Fix doctest.

* Fix formatting and add some logs.

* Add some docs.

* Remove unused files.
This commit is contained in:
Tomasz Drwięga
2019-11-22 17:10:23 +01:00
committed by Gavin Wood
parent f000392cc0
commit 86b6ac5571
39 changed files with 554 additions and 360 deletions
+6 -2
View File
@@ -18,7 +18,11 @@
use crate::{crypto::KeyTypeId, ed25519, sr25519};
use std::{fmt::{Debug, Display}, panic::UnwindSafe};
use std::{
fmt::{Debug, Display},
panic::UnwindSafe,
sync::Arc,
};
pub use externalities::{Externalities, ExternalitiesExt};
@@ -68,7 +72,7 @@ pub trait BareCryptoStore: Send + Sync {
}
/// A pointer to the key store.
pub type BareCryptoStorePtr = std::sync::Arc<parking_lot::RwLock<dyn BareCryptoStore>>;
pub type BareCryptoStorePtr = Arc<parking_lot::RwLock<dyn BareCryptoStore>>;
externalities::decl_extension! {
/// The keystore extension to register/retrieve from the externalities.