mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 11:51:12 +00:00
Introduce srml/im-online (#3079)
* Fix grammar and typo * Extend network service * Extend offchain API * Support creating unsigned UncheckedExtrinsic * Introduce srml/im-online * Bump impl and spec version * Fix web-wasm test * Apply suggestions from code review Remove parity-multiaddr dependency Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com> * Replace transmute with from_raw_parts * Replace PeerId.to_string() with .to_base58() Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com> * Update Cargo.lock * Bump impl and spec version (again) It was updated in master in the meantime. * Apply suggestions from code review Co-Authored-By: Sergei Pepyakin <sergei@parity.io> * Address comments * Add public function is_online_in_current_session() * Bump spec_version * Fix doc tests * Improve comments * Remove superfluous line * Name parameters consistently * Implement comments * Switch From to TryFrom * Use Vec instead of HashSet * Fix tests * Revert me: local testing * Fix check if already sent during session We gossip each session, hence we need to check if already sent in this session (not era). * Fix typos * Consistent terminology * Revert "Revert me: local testing" This reverts commit 73fbc29ff3e5ed71d99436318260b4f007e837f4. * Introduce IsMember trait * Implement misc comments * Remove unused function * Fix test * Fix external_addresses being written * Fix test * Add necessary trait bound * Do not increment version * Update lib.rs
This commit is contained in:
committed by
Gavin Wood
parent
a757dfb222
commit
c70b81444a
@@ -33,6 +33,7 @@ system = { package = "srml-system", path = "../../srml/system", default-features
|
||||
timestamp = { package = "srml-timestamp", path = "../../srml/timestamp", default-features = false }
|
||||
treasury = { package = "srml-treasury", path = "../../srml/treasury", default-features = false }
|
||||
sudo = { package = "srml-sudo", path = "../../srml/sudo", default-features = false }
|
||||
im-online = { package = "srml-im-online", path = "../../srml/im-online", default-features = false }
|
||||
node-primitives = { path = "../primitives", default-features = false }
|
||||
consensus_aura = { package = "substrate-consensus-aura-primitives", path = "../../core/consensus/aura/primitives", default-features = false }
|
||||
rustc-hex = { version = "2.0", optional = true }
|
||||
@@ -79,4 +80,5 @@ std = [
|
||||
"rustc-hex",
|
||||
"substrate-keyring",
|
||||
"offchain-primitives/std",
|
||||
"im-online/std",
|
||||
]
|
||||
|
||||
@@ -74,8 +74,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
// and set impl_version to equal spec_version. If only runtime
|
||||
// implementation changes and behavior does not, then leave spec_version as
|
||||
// is and increment impl_version.
|
||||
spec_version: 114,
|
||||
impl_version: 114,
|
||||
spec_version: 115,
|
||||
impl_version: 115,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
@@ -193,7 +193,7 @@ parameter_types! {
|
||||
pub const Offset: BlockNumber = 0;
|
||||
}
|
||||
|
||||
type SessionHandlers = (Grandpa, Aura);
|
||||
type SessionHandlers = (Grandpa, Aura, ImOnline);
|
||||
|
||||
impl_opaque_keys! {
|
||||
pub struct SessionKeys {
|
||||
@@ -371,6 +371,15 @@ impl sudo::Trait for Runtime {
|
||||
type Proposal = Call;
|
||||
}
|
||||
|
||||
impl im_online::Trait for Runtime {
|
||||
type AuthorityId = AuraId;
|
||||
type Call = Call;
|
||||
type Event = Event;
|
||||
type SessionsPerEra = SessionsPerEra;
|
||||
type UncheckedExtrinsic = UncheckedExtrinsic;
|
||||
type IsValidAuthorityId = Aura;
|
||||
}
|
||||
|
||||
impl grandpa::Trait for Runtime {
|
||||
type Event = Event;
|
||||
}
|
||||
@@ -409,6 +418,7 @@ construct_runtime!(
|
||||
Treasury: treasury::{Module, Call, Storage, Event<T>},
|
||||
Contracts: contracts,
|
||||
Sudo: sudo,
|
||||
ImOnline: im_online::{default, ValidateUnsigned},
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user