mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 19:51:05 +00:00
The crate rename (#4223)
* Adding script for rename, could be applicable for nodes on top of it, too * add stderr and gitlab ci features * apply script * fix now minor details in expected stderr * Update the Cargo.lock * fix name: sc-transaction -> sc-tracing * fix rename in script, too
This commit is contained in:
committed by
GitHub
parent
40f6d05a4c
commit
927e13c13a
@@ -1,41 +1,41 @@
|
||||
[package]
|
||||
name = "substrate-consensus-aura"
|
||||
name = "sc-consensus-aura"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Aura consensus algorithm for substrate"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
app-crypto = { package = "substrate-application-crypto", path = "../../../primitives/application-crypto" }
|
||||
aura_primitives = { package = "substrate-consensus-aura-primitives", path = "../../../primitives/consensus/aura" }
|
||||
block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api" }
|
||||
client = { package = "substrate-client", path = "../../" }
|
||||
client-api = { package = "substrate-client-api", path = "../../api" }
|
||||
app-crypto = { package = "sc-application-crypto", path = "../../../primitives/application-crypto" }
|
||||
aura_primitives = { package = "sp-consensus-aura", path = "../../../primitives/consensus/aura" }
|
||||
block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api" }
|
||||
client = { package = "sc-client", path = "../../" }
|
||||
client-api = { package = "sc-client-api", path = "../../api" }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0" }
|
||||
consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
|
||||
consensus_common = { package = "sp-consensus", path = "../../../primitives/consensus/common" }
|
||||
derive_more = "0.99.2"
|
||||
futures = { version = "0.3.1", features = ["compat"] }
|
||||
futures01 = { package = "futures", version = "0.1" }
|
||||
futures-timer = "0.4.0"
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
|
||||
keystore = { package = "substrate-keystore", path = "../../keystore" }
|
||||
inherents = { package = "sp-inherents", path = "../../../primitives/inherents" }
|
||||
keystore = { package = "sc-keystore", path = "../../keystore" }
|
||||
log = "0.4.8"
|
||||
parking_lot = "0.9.0"
|
||||
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core" }
|
||||
sp-blockchain = { path = "../../../primitives/blockchain" }
|
||||
runtime_io = { package = "sr-io", path = "../../../primitives/sr-io" }
|
||||
runtime_version = { package = "sr-version", path = "../../../primitives/sr-version" }
|
||||
slots = { package = "substrate-consensus-slots", path = "../slots" }
|
||||
sr-api = { path = "../../../primitives/sr-api" }
|
||||
sr-primitives = { path = "../../../primitives/sr-primitives" }
|
||||
runtime_io = { package = "sp-io", path = "../../../primitives/sr-io" }
|
||||
runtime_version = { package = "sp-version", path = "../../../primitives/sr-version" }
|
||||
slots = { package = "sc-consensus-slots", path = "../slots" }
|
||||
sp-api = { path = "../../../primitives/sr-api" }
|
||||
sp-runtime = { path = "../../../primitives/sr-primitives" }
|
||||
sp-timestamp = { path = "../../../primitives/timestamp" }
|
||||
substrate-telemetry = { path = "../../telemetry" }
|
||||
sc-telemetry = { path = "../../telemetry" }
|
||||
|
||||
[dev-dependencies]
|
||||
keyring = { package = "substrate-keyring", path = "../../../primitives/keyring" }
|
||||
substrate-executor = { path = "../../executor" }
|
||||
network = { package = "substrate-network", path = "../../network", features = ["test-helpers"]}
|
||||
service = { package = "substrate-service", path = "../../service" }
|
||||
keyring = { package = "sp-keyring", path = "../../../primitives/keyring" }
|
||||
sc-executor = { path = "../../executor" }
|
||||
network = { package = "sc-network", path = "../../network", features = ["test-helpers"]}
|
||||
service = { package = "sc-service", path = "../../service" }
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../../test/utils/runtime/client" }
|
||||
tokio = "0.1.22"
|
||||
env_logger = "0.7.0"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
use primitives::Pair;
|
||||
use aura_primitives::AURA_ENGINE_ID;
|
||||
use sr_primitives::generic::{DigestItem, OpaqueDigestItemId};
|
||||
use sp_runtime::generic::{DigestItem, OpaqueDigestItemId};
|
||||
use codec::{Encode, Codec};
|
||||
use std::fmt::Debug;
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ use sp_blockchain::{
|
||||
|
||||
use block_builder_api::BlockBuilder as BlockBuilderApi;
|
||||
|
||||
use sr_primitives::{generic::{BlockId, OpaqueDigestItemId}, Justification};
|
||||
use sr_primitives::traits::{Block as BlockT, Header, DigestItemFor, ProvideRuntimeApi, Zero, Member};
|
||||
use sp_runtime::{generic::{BlockId, OpaqueDigestItemId}, Justification};
|
||||
use sp_runtime::traits::{Block as BlockT, Header, DigestItemFor, ProvideRuntimeApi, Zero, Member};
|
||||
|
||||
use primitives::crypto::Pair;
|
||||
use inherents::{InherentDataProviders, InherentData};
|
||||
@@ -63,14 +63,14 @@ use sp_timestamp::{
|
||||
TimestampInherentData, InherentType as TimestampInherent, InherentError as TIError
|
||||
};
|
||||
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG, CONSENSUS_INFO};
|
||||
use sc_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG, CONSENSUS_INFO};
|
||||
|
||||
use slots::{CheckedHeader, SlotData, SlotWorker, SlotInfo, SlotCompatible};
|
||||
use slots::check_equivocation;
|
||||
|
||||
use keystore::KeyStorePtr;
|
||||
|
||||
use sr_api::ApiExt;
|
||||
use sp_api::ApiExt;
|
||||
|
||||
pub use aura_primitives::{
|
||||
ConsensusLog, AuraApi, AURA_ENGINE_ID,
|
||||
@@ -256,7 +256,7 @@ impl<H, B, C, E, I, P, Error, SO> slots::SimpleSlotWorker<B> for AuraWorker<C, E
|
||||
})
|
||||
}
|
||||
|
||||
fn pre_digest_data(&self, slot_number: u64, _claim: &Self::Claim) -> Vec<sr_primitives::DigestItem<B::Hash>> {
|
||||
fn pre_digest_data(&self, slot_number: u64, _claim: &Self::Claim) -> Vec<sp_runtime::DigestItem<B::Hash>> {
|
||||
vec![
|
||||
<DigestItemFor<B> as CompatibleDigestItem<P>>::aura_pre_digest(slot_number),
|
||||
]
|
||||
@@ -720,7 +720,7 @@ mod tests {
|
||||
use consensus_common::NoNetwork as DummyOracle;
|
||||
use network::test::*;
|
||||
use network::test::{Block as TestBlock, PeersClient, PeersFullClient};
|
||||
use sr_primitives::traits::{Block as BlockT, DigestFor};
|
||||
use sp_runtime::traits::{Block as BlockT, DigestFor};
|
||||
use network::config::ProtocolConfig;
|
||||
use parking_lot::Mutex;
|
||||
use tokio::runtime::current_thread;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-consensus-babe"
|
||||
name = "sc-consensus-babe"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "BABE consensus algorithm for substrate"
|
||||
@@ -7,27 +7,27 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] }
|
||||
babe_primitives = { package = "substrate-consensus-babe-primitives", path = "../../../primitives/consensus/babe" }
|
||||
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
|
||||
app-crypto = { package = "substrate-application-crypto", path = "../../../primitives/application-crypto" }
|
||||
babe_primitives = { package = "sp-consensus-babe", path = "../../../primitives/consensus/babe" }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core" }
|
||||
app-crypto = { package = "sc-application-crypto", path = "../../../primitives/application-crypto" }
|
||||
num-bigint = "0.2.3"
|
||||
num-rational = "0.2.2"
|
||||
num-traits = "0.2.8"
|
||||
runtime-version = { package = "sr-version", path = "../../../primitives/sr-version" }
|
||||
runtime-io = { package = "sr-io", path = "../../../primitives/sr-io" }
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
|
||||
runtime-version = { package = "sp-version", path = "../../../primitives/sr-version" }
|
||||
runtime-io = { package = "sp-io", path = "../../../primitives/sr-io" }
|
||||
inherents = { package = "sp-inherents", path = "../../../primitives/inherents" }
|
||||
sp-timestamp = { path = "../../../primitives/timestamp" }
|
||||
substrate-telemetry = { path = "../../telemetry" }
|
||||
keystore = { package = "substrate-keystore", path = "../../keystore" }
|
||||
client-api = { package = "substrate-client-api", path = "../../api" }
|
||||
client = { package = "substrate-client", path = "../../" }
|
||||
sr-api = { path = "../../../primitives/sr-api" }
|
||||
block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api" }
|
||||
sc-telemetry = { path = "../../telemetry" }
|
||||
keystore = { package = "sc-keystore", path = "../../keystore" }
|
||||
client-api = { package = "sc-client-api", path = "../../api" }
|
||||
client = { package = "sc-client", path = "../../" }
|
||||
sp-api = { path = "../../../primitives/sr-api" }
|
||||
block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api" }
|
||||
sp-blockchain = { path = "../../../primitives/blockchain" }
|
||||
consensus-common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
|
||||
uncles = { package = "substrate-consensus-uncles", path = "../uncles" }
|
||||
slots = { package = "substrate-consensus-slots", path = "../slots" }
|
||||
sr-primitives = { path = "../../../primitives/sr-primitives" }
|
||||
consensus-common = { package = "sp-consensus", path = "../../../primitives/consensus/common" }
|
||||
uncles = { package = "sc-consensus-uncles", path = "../uncles" }
|
||||
slots = { package = "sc-consensus-slots", path = "../slots" }
|
||||
sp-runtime = { path = "../../../primitives/sr-primitives" }
|
||||
fork-tree = { path = "../../../utils/fork-tree" }
|
||||
futures = { version = "0.3.1", features = ["compat"] }
|
||||
futures01 = { package = "futures", version = "0.1" }
|
||||
@@ -41,12 +41,12 @@ pdqselect = "0.1.0"
|
||||
derive_more = "0.99.2"
|
||||
|
||||
[dev-dependencies]
|
||||
keyring = { package = "substrate-keyring", path = "../../../primitives/keyring" }
|
||||
substrate-executor = { path = "../../executor" }
|
||||
network = { package = "substrate-network", path = "../../network", features = ["test-helpers"]}
|
||||
service = { package = "substrate-service", path = "../../service" }
|
||||
keyring = { package = "sp-keyring", path = "../../../primitives/keyring" }
|
||||
sc-executor = { path = "../../executor" }
|
||||
network = { package = "sc-network", path = "../../network", features = ["test-helpers"]}
|
||||
service = { package = "sc-service", path = "../../service" }
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../../test/utils/runtime/client" }
|
||||
block-builder = { package = "substrate-block-builder", path = "../../block-builder" }
|
||||
block-builder = { package = "sc-block-builder", path = "../../block-builder" }
|
||||
tokio = "0.1.22"
|
||||
env_logger = "0.7.0"
|
||||
tempfile = "3.1.0"
|
||||
|
||||
@@ -21,7 +21,7 @@ use codec::{Decode, Encode};
|
||||
|
||||
use client_api::backend::AuxStore;
|
||||
use sp_blockchain::{Result as ClientResult, Error as ClientError};
|
||||
use sr_primitives::traits::Block as BlockT;
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
use babe_primitives::BabeBlockWeight;
|
||||
|
||||
use super::{epoch_changes::EpochChangesFor, SharedEpochChanges};
|
||||
|
||||
@@ -23,7 +23,7 @@ use std::sync::Arc;
|
||||
use babe_primitives::{Epoch, SlotNumber, NextEpochDescriptor};
|
||||
use fork_tree::ForkTree;
|
||||
use parking_lot::{Mutex, MutexGuard};
|
||||
use sr_primitives::traits::{Block as BlockT, NumberFor, One, Zero};
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor, One, Zero};
|
||||
use codec::{Encode, Decode};
|
||||
use client_api::utils::is_descendent_of;
|
||||
use sp_blockchain::{HeaderMetadata, HeaderBackend, Error as ClientError};
|
||||
|
||||
@@ -69,8 +69,8 @@ use consensus_common::{ImportResult, CanAuthorWith};
|
||||
use consensus_common::import_queue::{
|
||||
BoxJustificationImport, BoxFinalityProofImport,
|
||||
};
|
||||
use sr_primitives::{generic::{BlockId, OpaqueDigestItemId}, Justification};
|
||||
use sr_primitives::traits::{
|
||||
use sp_runtime::{generic::{BlockId, OpaqueDigestItemId}, Justification};
|
||||
use sp_runtime::traits::{
|
||||
Block as BlockT, Header, DigestItemFor, ProvideRuntimeApi,
|
||||
Zero,
|
||||
};
|
||||
@@ -78,7 +78,7 @@ use keystore::KeyStorePtr;
|
||||
use parking_lot::Mutex;
|
||||
use primitives::{Blake2Hasher, H256, Pair};
|
||||
use inherents::{InherentDataProviders, InherentData};
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG};
|
||||
use sc_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG};
|
||||
use consensus_common::{
|
||||
self, BlockImport, Environment, Proposer, BlockCheckParams,
|
||||
ForkChoiceStrategy, BlockImportParams, BlockOrigin, Error as ConsensusError,
|
||||
@@ -107,7 +107,7 @@ use sp_blockchain::{
|
||||
};
|
||||
use schnorrkel::SignatureError;
|
||||
|
||||
use sr_api::ApiExt;
|
||||
use sp_api::ApiExt;
|
||||
|
||||
mod aux_schema;
|
||||
mod verification;
|
||||
@@ -411,7 +411,7 @@ impl<B, C, E, I, Error, SO> slots::SimpleSlotWorker<B> for BabeWorker<B, C, E, I
|
||||
s
|
||||
}
|
||||
|
||||
fn pre_digest_data(&self, _slot_number: u64, claim: &Self::Claim) -> Vec<sr_primitives::DigestItem<B::Hash>> {
|
||||
fn pre_digest_data(&self, _slot_number: u64, claim: &Self::Claim) -> Vec<sp_runtime::DigestItem<B::Hash>> {
|
||||
vec![
|
||||
<DigestItemFor<B> as CompatibleDigestItem>::babe_pre_digest(claim.0.clone()),
|
||||
]
|
||||
|
||||
@@ -31,7 +31,7 @@ use consensus_common::import_queue::{
|
||||
use network::test::*;
|
||||
use network::test::{Block as TestBlock, PeersClient};
|
||||
use network::config::BoxFinalityProofRequestBuilder;
|
||||
use sr_primitives::{generic::DigestItem, traits::{Block as BlockT, DigestFor}};
|
||||
use sp_runtime::{generic::DigestItem, traits::{Block as BlockT, DigestFor}};
|
||||
use network::config::ProtocolConfig;
|
||||
use tokio::runtime::current_thread;
|
||||
use client_api::BlockchainEvents;
|
||||
@@ -540,7 +540,7 @@ fn propose_and_import_block(
|
||||
parent_pre_digest.slot_number() + 1
|
||||
});
|
||||
|
||||
let pre_digest = sr_primitives::generic::Digest {
|
||||
let pre_digest = sp_runtime::generic::Digest {
|
||||
logs: vec![
|
||||
Item::babe_pre_digest(
|
||||
BabePreDigest::Secondary {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Verification for BABE headers.
|
||||
use schnorrkel::vrf::{VRFOutput, VRFProof};
|
||||
use sr_primitives::{traits::Header, traits::DigestItemFor};
|
||||
use sp_runtime::{traits::Header, traits::DigestItemFor};
|
||||
use primitives::{Pair, Public};
|
||||
use babe_primitives::{Epoch, BabePreDigest, CompatibleDigestItem, AuthorityId};
|
||||
use babe_primitives::{AuthoritySignature, SlotNumber, AuthorityIndex, AuthorityPair};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-consensus-pow"
|
||||
name = "sc-consensus-pow"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "PoW consensus algorithm for substrate"
|
||||
@@ -7,14 +7,14 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] }
|
||||
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core" }
|
||||
sp-blockchain = { path = "../../../primitives/blockchain" }
|
||||
sr-primitives = { path = "../../../primitives/sr-primitives" }
|
||||
client-api = { package = "substrate-client-api", path = "../../api" }
|
||||
block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api" }
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
|
||||
pow-primitives = { package = "substrate-consensus-pow-primitives", path = "../../../primitives/consensus/pow" }
|
||||
consensus-common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
|
||||
sp-runtime = { path = "../../../primitives/sr-primitives" }
|
||||
client-api = { package = "sc-client-api", path = "../../api" }
|
||||
block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api" }
|
||||
inherents = { package = "sp-inherents", path = "../../../primitives/inherents" }
|
||||
pow-primitives = { package = "sp-consensus-pow", path = "../../../primitives/consensus/pow" }
|
||||
consensus-common = { package = "sp-consensus", path = "../../../primitives/consensus/common" }
|
||||
log = "0.4.8"
|
||||
futures = { version = "0.3.1", features = ["compat"] }
|
||||
sp-timestamp = { path = "../../../primitives/timestamp" }
|
||||
|
||||
@@ -35,9 +35,9 @@ use std::collections::HashMap;
|
||||
use client_api::{BlockOf, backend::AuxStore};
|
||||
use sp_blockchain::{HeaderBackend, ProvideCache, well_known_cache_keys::Id as CacheKeyId};
|
||||
use block_builder_api::BlockBuilder as BlockBuilderApi;
|
||||
use sr_primitives::{Justification, RuntimeString};
|
||||
use sr_primitives::generic::{BlockId, Digest, DigestItem};
|
||||
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, ProvideRuntimeApi};
|
||||
use sp_runtime::{Justification, RuntimeString};
|
||||
use sp_runtime::generic::{BlockId, Digest, DigestItem};
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, ProvideRuntimeApi};
|
||||
use sp_timestamp::{TimestampInherentData, InherentError as TIError};
|
||||
use pow_primitives::{Seal, TotalDifficulty, POW_ENGINE_ID};
|
||||
use primitives::H256;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-consensus-slots"
|
||||
name = "sc-consensus-slots"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Generic slots-based utilities for consensus"
|
||||
@@ -8,13 +8,13 @@ build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0" }
|
||||
client-api = { package = "substrate-client-api", path = "../../api" }
|
||||
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
|
||||
client-api = { package = "sc-client-api", path = "../../api" }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core" }
|
||||
sp-blockchain = { path = "../../../primitives/blockchain" }
|
||||
sr-primitives = { path = "../../../primitives/sr-primitives" }
|
||||
substrate-telemetry = { path = "../../telemetry" }
|
||||
consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
|
||||
sp-runtime = { path = "../../../primitives/sr-primitives" }
|
||||
sc-telemetry = { path = "../../telemetry" }
|
||||
consensus_common = { package = "sp-consensus", path = "../../../primitives/consensus/common" }
|
||||
inherents = { package = "sp-inherents", path = "../../../primitives/inherents" }
|
||||
futures = "0.3.1"
|
||||
futures-timer = "2.0"
|
||||
parking_lot = "0.9.0"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
use codec::{Encode, Decode};
|
||||
use client_api::backend::AuxStore;
|
||||
use sp_blockchain::{Result as ClientResult, Error as ClientError};
|
||||
use sr_primitives::traits::Header;
|
||||
use sp_runtime::traits::Header;
|
||||
|
||||
const SLOT_HEADER_MAP_KEY: &[u8] = b"slot_header_map";
|
||||
const SLOT_HEADER_START: &[u8] = b"slot_header_start";
|
||||
@@ -153,7 +153,7 @@ pub fn check_equivocation<C, H, P>(
|
||||
mod test {
|
||||
use primitives::{sr25519, Pair};
|
||||
use primitives::hash::H256;
|
||||
use sr_primitives::testing::{Header as HeaderTest, Digest as DigestTest};
|
||||
use sp_runtime::testing::{Header as HeaderTest, Digest as DigestTest};
|
||||
use test_client;
|
||||
|
||||
use super::{MAX_SLOT_CAPACITY, PRUNING_BOUND, check_equivocation};
|
||||
|
||||
@@ -36,10 +36,10 @@ use futures::{prelude::*, future::{self, Either}};
|
||||
use futures_timer::Delay;
|
||||
use inherents::{InherentData, InherentDataProviders};
|
||||
use log::{debug, error, info, warn};
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::traits::{ApiRef, Block as BlockT, Header, ProvideRuntimeApi};
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_runtime::traits::{ApiRef, Block as BlockT, Header, ProvideRuntimeApi};
|
||||
use std::{fmt::Debug, ops::Deref, pin::Pin, sync::Arc, time::{Instant, Duration}};
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_DEBUG, CONSENSUS_WARN, CONSENSUS_INFO};
|
||||
use sc_telemetry::{telemetry, CONSENSUS_DEBUG, CONSENSUS_WARN, CONSENSUS_INFO};
|
||||
use parking_lot::Mutex;
|
||||
use client_api;
|
||||
|
||||
@@ -94,7 +94,7 @@ pub trait SimpleSlotWorker<B: BlockT> {
|
||||
) -> Option<Self::Claim>;
|
||||
|
||||
/// Return the pre digest data to include in a block authored with the given claim.
|
||||
fn pre_digest_data(&self, slot_number: u64, claim: &Self::Claim) -> Vec<sr_primitives::DigestItem<B::Hash>>;
|
||||
fn pre_digest_data(&self, slot_number: u64, claim: &Self::Claim) -> Vec<sp_runtime::DigestItem<B::Hash>>;
|
||||
|
||||
/// Returns a function which produces a `BlockImportParams`.
|
||||
fn block_import_params(&self) -> Box<dyn Fn(
|
||||
@@ -218,7 +218,7 @@ pub trait SimpleSlotWorker<B: BlockT> {
|
||||
// deadline our production to approx. the end of the slot
|
||||
let proposing = proposer.propose(
|
||||
slot_info.inherent_data,
|
||||
sr_primitives::generic::Digest {
|
||||
sp_runtime::generic::Digest {
|
||||
logs,
|
||||
},
|
||||
slot_remaining_duration,
|
||||
@@ -448,7 +448,7 @@ impl<T: Clone> SlotDuration<T> {
|
||||
})
|
||||
}),
|
||||
None => {
|
||||
use sr_primitives::traits::Zero;
|
||||
use sp_runtime::traits::Zero;
|
||||
let genesis_slot_duration =
|
||||
cb(client.runtime_api(), &BlockId::number(Zero::zero()))?;
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
[package]
|
||||
name = "substrate-consensus-uncles"
|
||||
name = "sc-consensus-uncles"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Generic uncle inclusion utilities for consensus"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
client-api = { package = "substrate-client-api", path = "../../api" }
|
||||
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
|
||||
sr-primitives = { path = "../../../primitives/sr-primitives" }
|
||||
client-api = { package = "sc-client-api", path = "../../api" }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core" }
|
||||
sp-runtime = { path = "../../../primitives/sr-primitives" }
|
||||
sp-authorship = { path = "../../../primitives/authorship" }
|
||||
consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
|
||||
consensus_common = { package = "sp-consensus", path = "../../../primitives/consensus/common" }
|
||||
inherents = { package = "sp-inherents", path = "../../../primitives/inherents" }
|
||||
log = "0.4.8"
|
||||
|
||||
@@ -23,7 +23,7 @@ use consensus_common::SelectChain;
|
||||
use inherents::{InherentDataProviders};
|
||||
use log::warn;
|
||||
use client_api::ProvideUncles;
|
||||
use sr_primitives::traits::{Block as BlockT, Header};
|
||||
use sp_runtime::traits::{Block as BlockT, Header};
|
||||
use std::sync::Arc;
|
||||
use sp_authorship;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user