mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-30 15:39:49 +00:00
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:
1 parent
2edeef5825
commit
a3d19baea3
17 files changed
+509
-327
No files matched your search
@@ -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(),
|
||||
|
||||
Reference in new issue
Block a user