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

+3 -1
View File
@@ -43,6 +43,8 @@ construct_simple_protocol! {
construct_service_factory! {
struct Factory {
Block = Block,
ConsensusPair = Pair,
FinalityPair = Pair,
RuntimeApi = RuntimeApi,
NetworkProtocol = NodeProtocol { |config| Ok(NodeProtocol::new()) },
RuntimeDispatch = Executor,
@@ -66,7 +68,7 @@ construct_service_factory! {
},
AuthoritySetup = {
|service: Self::FullService| {
if let Some(key) = service.authority_key::<Pair>() {
if let Some(key) = service.authority_key() {
info!("Using authority key {}", key.public());
let proposer = Arc::new(ProposerFactory {
client: service.client(),