From 8dafe77cf06cd693ae52f701ea4e0d186d75d453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 16 Jan 2020 09:58:09 +0100 Subject: [PATCH 1/3] Rename basic-authority to basic-authorship --- .maintain/rename-crates-for-2.0.sh | 3 ++- Cargo.lock | 6 +++--- bin/node-template/Cargo.toml | 2 +- bin/node-template/src/service.rs | 4 ++-- bin/node/cli/Cargo.toml | 2 +- bin/node/cli/src/service.rs | 4 ++-- client/basic-authorship/Cargo.toml | 2 +- client/basic-authorship/src/lib.rs | 2 +- 8 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.maintain/rename-crates-for-2.0.sh b/.maintain/rename-crates-for-2.0.sh index d2bd871f09780..0a22b4b41c43b 100644 --- a/.maintain/rename-crates-for-2.0.sh +++ b/.maintain/rename-crates-for-2.0.sh @@ -1,4 +1,4 @@ -#!/bin/bash + #!/bin/bash function rust_rename() { sed -i "s/$1/$2/g" `grep -Rl --include="*.rs" --include="*.stderr" "$1" *` > /dev/null @@ -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" # PRIMITIVES "substrate-application-crypto sp-application-crypto" diff --git a/Cargo.lock b/Cargo.lock index 82f43ac5d54f5..5c28852df6ae7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3045,7 +3045,7 @@ dependencies = [ "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "sc-authority-discovery 2.0.0", - "sc-basic-authority 2.0.0", + "sc-basic-authorship 2.0.0", "sc-chain-spec 2.0.0", "sc-cli 2.0.0", "sc-client 2.0.0", @@ -3223,7 +3223,7 @@ dependencies = [ "node-template-runtime 2.0.0", "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-basic-authority 2.0.0", + "sc-basic-authorship 2.0.0", "sc-cli 2.0.0", "sc-client 2.0.0", "sc-consensus-aura 0.8.0", @@ -5037,7 +5037,7 @@ dependencies = [ ] [[package]] -name = "sc-basic-authority" +name = "sc-basic-authorship" version = "2.0.0" dependencies = [ "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/bin/node-template/Cargo.toml b/bin/node-template/Cargo.toml index aaaae647cf564..c44d19a711fa6 100644 --- a/bin/node-template/Cargo.toml +++ b/bin/node-template/Cargo.toml @@ -35,7 +35,7 @@ grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", path sc-client = { version = "2.0.0", 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" diff --git a/bin/node-template/src/service.rs b/bin/node-template/src/service.rs index 92db95b5c7d89..05edb23982689 100644 --- a/bin/node-template/src/service.rs +++ b/bin/node-template/src/service.rs @@ -11,7 +11,7 @@ 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 sc_basic_authorship; // Our native executor instance. native_executor_instance!( @@ -106,7 +106,7 @@ pub fn new_full(config: Configuration"] edition = "2018" diff --git a/client/basic-authorship/src/lib.rs b/client/basic-authorship/src/lib.rs index cf77c8a3f341a..13e2754382ea1 100644 --- a/client/basic-authorship/src/lib.rs +++ b/client/basic-authorship/src/lib.rs @@ -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}; From 8338cfa0ba55ee599719f01e34b8e68cc4aad2ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 16 Jan 2020 10:06:28 +0100 Subject: [PATCH 2/3] Revert weird tab. --- .maintain/rename-crates-for-2.0.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.maintain/rename-crates-for-2.0.sh b/.maintain/rename-crates-for-2.0.sh index 0a22b4b41c43b..10dbf17400844 100644 --- a/.maintain/rename-crates-for-2.0.sh +++ b/.maintain/rename-crates-for-2.0.sh @@ -1,4 +1,4 @@ - #!/bin/bash +#!/bin/bash function rust_rename() { sed -i "s/$1/$2/g" `grep -Rl --include="*.rs" --include="*.stderr" "$1" *` > /dev/null From b262b1b74f44eb1140db6027a33206a921cee043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 16 Jan 2020 10:47:28 +0100 Subject: [PATCH 3/3] Fix rename. --- .maintain/rename-crates-for-2.0.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.maintain/rename-crates-for-2.0.sh b/.maintain/rename-crates-for-2.0.sh index 10dbf17400844..b024cfd4418c6 100644 --- a/.maintain/rename-crates-for-2.0.sh +++ b/.maintain/rename-crates-for-2.0.sh @@ -89,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"