Refactors the offchain worker api (#3150)

* Update offchain primitives.

* Update offchain worker.

* Update im-online.

* Update service.

* Update node and node-template.

* Update runtime version.

* Fix build.

* Fix offchain worker tests.

* Generalize authority_pubkey.

* Add test.

* Update lib.rs
This commit is contained in:
David Craven authored and Gavin Wood committed 2019-07-22 17:20:57 +08:00
1 parent 2edeef5825
commit a3d19baea3
17 files changed
+509 -327

No files matched your search

+2 -2
View File
@@ -28,7 +28,7 @@ use parking_lot::Mutex;
/// Offchain local storage
#[derive(Clone)]
pub struct LocalStorage {
db: Arc<KeyValueDB>,
db: Arc<dyn KeyValueDB>,
locks: Arc<Mutex<HashMap<Vec<u8>, Arc<Mutex<()>>>>>,
}
@@ -48,7 +48,7 @@ impl LocalStorage {
}
/// Create offchain local storage with given `KeyValueDB` backend.
pub fn new(db: Arc<KeyValueDB>) -> Self {
pub fn new(db: Arc<dyn KeyValueDB>) -> Self {
Self {
db,
locks: Default::default(),