mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
Generalize the Consensus Infrastructure (#883)
* Split out Consensus * Supply ImportQueue through network-service - simplify ImportQueue.import_blocks - remove Deadlock on import_block - Adding Verifier-Trait - Implement import_queue provisioning in service; allow cli to import * Allow to actually customize import queue * Consensus Gossip: Cache Message hash per Topic
This commit is contained in:
committed by
GitHub
parent
a24e61cb29
commit
ac4bcf879f
@@ -22,7 +22,6 @@ std = [
|
||||
"serde/std",
|
||||
"serde_derive",
|
||||
"parity-codec/std",
|
||||
"parity-codec-derive/std",
|
||||
"substrate-primitives/std",
|
||||
"sr-std/std",
|
||||
"sr-io/std",
|
||||
|
||||
@@ -46,7 +46,6 @@ use runtime_support::dispatch::Result;
|
||||
use runtime_support::storage::StorageValue;
|
||||
use runtime_support::storage::unhashed::StorageVec;
|
||||
use primitives::traits::{MaybeSerializeDebug, OnFinalise, Member};
|
||||
use primitives::bft::MisbehaviorReport;
|
||||
use substrate_primitives::storage::well_known_keys;
|
||||
use system::{ensure_signed, ensure_inherent};
|
||||
|
||||
@@ -140,7 +139,7 @@ decl_storage! {
|
||||
|
||||
decl_module! {
|
||||
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
|
||||
fn report_misbehavior(origin, report: MisbehaviorReport<T::Hash, T::BlockNumber>) -> Result;
|
||||
fn report_misbehavior(origin, report: Vec<u8>) -> Result;
|
||||
fn note_offline(origin, offline_val_indices: Vec<u32>) -> Result;
|
||||
fn remark(origin, remark: Vec<u8>) -> Result;
|
||||
fn set_code(new: Vec<u8>) -> Result;
|
||||
@@ -169,7 +168,7 @@ impl<T: Trait> Module<T> {
|
||||
}
|
||||
|
||||
/// Report some misbehaviour.
|
||||
fn report_misbehavior(origin: T::Origin, _report: MisbehaviorReport<T::Hash, T::BlockNumber>) -> Result {
|
||||
fn report_misbehavior(origin: T::Origin, _report: Vec<u8>) -> Result {
|
||||
ensure_signed(origin)?;
|
||||
// TODO.
|
||||
Ok(())
|
||||
|
||||
@@ -15,7 +15,6 @@ sr-std = { path = "../../core/sr-std", default-features = false }
|
||||
sr-io = { path = "../../core/sr-io", default-features = false }
|
||||
sr-primitives = { path = "../../core/sr-primitives", default-features = false }
|
||||
srml-support = { path = "../support", default-features = false }
|
||||
srml-consensus = { path = "../consensus", default-features = false }
|
||||
srml-balances = { path = "../balances", default-features = false }
|
||||
srml-democracy = { path = "../democracy", default-features = false }
|
||||
srml-system = { path = "../system", default-features = false }
|
||||
@@ -33,7 +32,6 @@ std = [
|
||||
"sr-io/std",
|
||||
"srml-support/std",
|
||||
"sr-primitives/std",
|
||||
"srml-consensus/std",
|
||||
"srml-balances/std",
|
||||
"srml-democracy/std",
|
||||
"srml-system/std",
|
||||
|
||||
@@ -16,7 +16,6 @@ sr-io = { path = "../../core/sr-io", default-features = false }
|
||||
sr-primitives = { path = "../../core/sr-primitives", default-features = false }
|
||||
srml-support = { path = "../support", default-features = false }
|
||||
srml-balances = { path = "../balances", default-features = false }
|
||||
srml-consensus = { path = "../consensus", default-features = false }
|
||||
srml-system = { path = "../system", default-features = false }
|
||||
|
||||
[features]
|
||||
@@ -31,7 +30,6 @@ std = [
|
||||
"sr-io/std",
|
||||
"srml-support/std",
|
||||
"sr-primitives/std",
|
||||
"srml-consensus/std",
|
||||
"srml-balances/std",
|
||||
"srml-system/std",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user