Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Rename basic-authority to basic-authorship #4640

Merged
merged 4 commits into from
Jan 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .maintain/rename-crates-for-2.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ TO_RENAME=(
"sp-finality-granpda sp-finality-grandpa"
"sp-sesssion sp-session"
"sp-tracing-pool sp-transaction-pool"
"sc-basic-authority sc-basic-authorship"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably want to update line 92, too (otherwise updating an older work will be left an in a non-working state). Can't comment there :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks for catching that.


# PRIMITIVES
"substrate-application-crypto sp-application-crypto"
Expand Down Expand Up @@ -88,7 +89,7 @@ TO_RENAME=(
"substrate-client sc-client"
"substrate-client-api sc-api"
"substrate-authority-discovery sc-authority-discovery"
"substrate-basic-authorship sc-basic-authority"
"substrate-basic-authorship sc-basic-authorship"
"substrate-block-builder sc-block-builder"
"substrate-chain-spec sc-chain-spec"
"substrate-chain-spec-derive sc-chain-spec-derive"
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bin/node-template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", path
sc-client = { version = "0.8", path = "../../client/" }
node-template-runtime = { version = "2.0.0", path = "runtime" }
sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" }
sc-basic-authority = { path = "../../client/basic-authorship" }
sc-basic-authorship = { path = "../../client/basic-authorship" }

[build-dependencies]
vergen = "3.0.4"
Expand Down
3 changes: 1 addition & 2 deletions bin/node-template/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use sc_executor::native_executor_instance;
pub use sc_executor::NativeExecutor;
use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};
use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider};
use sc_basic_authority;
use futures::{FutureExt, compat::Future01CompatExt};

// Our native executor instance.
Expand Down Expand Up @@ -107,7 +106,7 @@ pub fn new_full<C: Send + Default + 'static>(config: Configuration<C, GenesisCon
.build()?;

if participates_in_consensus {
let proposer = sc_basic_authority::ProposerFactory {
let proposer = sc_basic_authorship::ProposerFactory {
client: service.client(),
transaction_pool: service.transaction_pool(),
};
Expand Down
2 changes: 1 addition & 1 deletion bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ grandpa = { version = "0.8", package = "sc-finality-grandpa", path = "../../../c
sc-client-db = { version = "0.8", default-features = false, path = "../../../client/db" }
sc-offchain = { version = "2.0.0", path = "../../../client/offchain" }
sc-rpc = { version = "2.0.0", path = "../../../client/rpc" }
sc-basic-authority = { version = "0.8", path = "../../../client/basic-authorship" }
sc-basic-authorship = { version = "0.8", path = "../../../client/basic-authorship" }
sc-service = { version = "0.8", default-features = false, path = "../../../client/service" }
sc-telemetry = { version = "2.0.0", path = "../../../client/telemetry" }
sc-authority-discovery = { version = "0.8", path = "../../../client/authority-discovery" }
Expand Down
4 changes: 2 additions & 2 deletions bin/node/cli/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ macro_rules! new_full {
($with_startup_data)(&block_import, &babe_link);

if participates_in_consensus {
let proposer = sc_basic_authority::ProposerFactory {
let proposer = sc_basic_authorship::ProposerFactory {
client: service.client(),
transaction_pool: service.transaction_pool(),
};
Expand Down Expand Up @@ -509,7 +509,7 @@ mod tests {

let parent_id = BlockId::number(service.client().chain_info().best_number);
let parent_header = service.client().header(&parent_id).unwrap().unwrap();
let mut proposer_factory = sc_basic_authority::ProposerFactory {
let mut proposer_factory = sc_basic_authorship::ProposerFactory {
client: service.client(),
transaction_pool: service.transaction_pool(),
};
Expand Down
2 changes: 1 addition & 1 deletion client/basic-authorship/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "sc-basic-authority"
name = "sc-basic-authorship"
version = "0.8.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion client/basic-authorship/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//! # Example
//!
//! ```
//! # use sc_basic_authority::ProposerFactory;
//! # use sc_basic_authorship::ProposerFactory;
//! # use sp_consensus::{Environment, Proposer, RecordProof};
//! # use sp_runtime::generic::BlockId;
//! # use std::{sync::Arc, time::Duration};
Expand Down