mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +00:00
Adds babe rpc support (#4729)
* babe_epochAuthorship remove test-helpers from sp-keyring, bump spec_version, impl_version * bump Cargo.lock * add BabeRPC to node-rpc * rename to BabeApi, remove err_derive * pass &ServiceBuilder to with_rpc_extensions callback * sc-consensus-babe-rpc * Update client/consensus/babe/src/lib.rs Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com> * Better docs, code style chanegs Co-Authored-By: André Silva <andre.beat@gmail.com> * new line at the end of Cargo.toml Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com> Co-authored-by: André Silva <andre.beat@gmail.com>
This commit is contained in:
@@ -52,7 +52,7 @@ use cfg_if::cfg_if;
|
||||
use sp_core::storage::ChildType;
|
||||
|
||||
// Ensure Babe and Aura use the same crypto to simplify things a bit.
|
||||
pub use sp_consensus_babe::AuthorityId;
|
||||
pub use sp_consensus_babe::{AuthorityId, SlotNumber};
|
||||
pub type AuraId = sp_consensus_aura::sr25519::AuthorityId;
|
||||
|
||||
// Include the WASM binary
|
||||
@@ -606,6 +606,10 @@ cfg_if! {
|
||||
secondary_slots: true,
|
||||
}
|
||||
}
|
||||
|
||||
fn current_epoch_start() -> SlotNumber {
|
||||
<pallet_babe::Module<Runtime>>::current_epoch_start()
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
|
||||
@@ -793,6 +797,10 @@ cfg_if! {
|
||||
secondary_slots: true,
|
||||
}
|
||||
}
|
||||
|
||||
fn current_epoch_start() -> SlotNumber {
|
||||
<pallet_babe::Module<Runtime>>::current_epoch_start()
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user