mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user