mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 03:01:07 +00:00
moving core/service/consensus into new core/authorship crate (#1257)
This commit is contained in:
committed by
Robert Habermeier
parent
3add75910a
commit
771a8127c2
Generated
+15
@@ -1804,6 +1804,7 @@ dependencies = [
|
||||
"sr-io 0.1.0",
|
||||
"sr-primitives 0.1.0",
|
||||
"structopt 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"substrate-basic-authorship 0.1.0",
|
||||
"substrate-cli 0.3.0",
|
||||
"substrate-client 0.1.0",
|
||||
"substrate-consensus-aura 0.1.0",
|
||||
@@ -3297,6 +3298,20 @@ dependencies = [
|
||||
"vergen 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "substrate-basic-authorship"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-primitives 0.1.0",
|
||||
"substrate-client 0.1.0",
|
||||
"substrate-consensus-aura-primitives 0.1.0",
|
||||
"substrate-consensus-common 0.1.0",
|
||||
"substrate-primitives 0.1.0",
|
||||
"substrate-transaction-pool 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "substrate-cli"
|
||||
version = "0.3.0"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
[package]
|
||||
name = "substrate-basic-authorship"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
parity-codec = "2.1"
|
||||
sr-primitives = { path = "../../core/sr-primitives" }
|
||||
substrate-client = { path = "../../core/client" }
|
||||
substrate-consensus-aura-primitives = { path = "../../core/consensus/aura/primitives" }
|
||||
substrate-consensus-common = { path = "../../core/consensus/common" }
|
||||
substrate-primitives = { path = "../../core/primitives" }
|
||||
substrate-transaction-pool = { path = "../../core/transaction-pool" }
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright 2017-2018 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Substrate is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Substrate is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Basic implementation of block-authoring logic.
|
||||
|
||||
#![warn(unused_extern_crates)]
|
||||
|
||||
extern crate substrate_consensus_aura_primitives as aura_primitives;
|
||||
extern crate substrate_primitives as primitives;
|
||||
extern crate sr_primitives as runtime_primitives;
|
||||
extern crate substrate_consensus_common as consensus_common;
|
||||
extern crate substrate_client as client;
|
||||
extern crate parity_codec as codec;
|
||||
extern crate substrate_transaction_pool as transaction_pool;
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
mod basic_authorship;
|
||||
|
||||
pub use basic_authorship::ProposerFactory;
|
||||
@@ -58,7 +58,6 @@ mod error;
|
||||
mod chain_spec;
|
||||
pub mod config;
|
||||
pub mod chain_ops;
|
||||
pub mod consensus;
|
||||
|
||||
use std::io;
|
||||
use std::net::SocketAddr;
|
||||
@@ -82,7 +81,6 @@ pub use chain_spec::{ChainSpec, Properties};
|
||||
pub use transaction_pool::txpool::{self, Pool as TransactionPool, Options as TransactionPoolOptions, ChainApi, IntoPoolError};
|
||||
pub use client::ExecutionStrategy;
|
||||
|
||||
pub use consensus::ProposerFactory;
|
||||
pub use components::{ServiceFactory, FullBackend, FullExecutor, LightBackend,
|
||||
LightExecutor, Components, PoolApi, ComponentClient,
|
||||
ComponentBlock, FullClient, LightClient, FullComponents, LightComponents,
|
||||
|
||||
@@ -19,6 +19,7 @@ substrate-primitives = { path = "../../core/primitives" }
|
||||
node-runtime = { path = "../runtime" }
|
||||
node-primitives = { path = "../primitives" }
|
||||
hex-literal = "0.1"
|
||||
substrate-basic-authorship = { path = "../../core/basic-authorship" }
|
||||
substrate-service = { path = "../../core/service" }
|
||||
substrate-transaction-pool = { path = "../../core/transaction-pool" }
|
||||
substrate-network = { path = "../../core/network" }
|
||||
|
||||
@@ -77,7 +77,7 @@ construct_service_factory! {
|
||||
|
||||
if let Some(ref key) = local_key {
|
||||
info!("Using authority key {}", key.public());
|
||||
let proposer = Arc::new(substrate_service::ProposerFactory {
|
||||
let proposer = Arc::new(substrate_basic_authorship::ProposerFactory {
|
||||
client: service.client(),
|
||||
transaction_pool: service.transaction_pool(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user