From c0e68ec3eafdcf2416bdf9ab64e5a2a1c46338fa Mon Sep 17 00:00:00 2001 From: Quentin Le Sceller Date: Thu, 8 Oct 2020 10:00:01 -0400 Subject: [PATCH] Rename Floonet to Testnet (#521) * Replace floonet by testnet * Update Cargo.lock --- Cargo.lock | 16 ++++++++-------- api/src/owner.rs | 2 +- config/src/config.rs | 2 +- impls/src/lifecycle/default.rs | 2 +- impls/src/lifecycle/seed.rs | 4 ++-- libwallet/src/types.rs | 4 ++-- src/bin/grin-wallet.rs | 4 ++-- src/bin/grin-wallet.yml | 6 +++--- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba4285f1..72f243df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1171,7 +1171,7 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "grin_api" version = "4.2.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#4c6d1dd4bd55e7ee8ad697d008d3292fbf09f99e" +source = "git+https://github.com/mimblewimble/grin#cf2a65242d9805b0688e40f2432250461aa56561" dependencies = [ "bytes", "easy-jsonrpc-mw", @@ -1204,7 +1204,7 @@ dependencies = [ [[package]] name = "grin_chain" version = "4.2.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#4c6d1dd4bd55e7ee8ad697d008d3292fbf09f99e" +source = "git+https://github.com/mimblewimble/grin#cf2a65242d9805b0688e40f2432250461aa56561" dependencies = [ "bit-vec", "bitflags 1.2.1", @@ -1228,7 +1228,7 @@ dependencies = [ [[package]] name = "grin_core" version = "4.2.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#4c6d1dd4bd55e7ee8ad697d008d3292fbf09f99e" +source = "git+https://github.com/mimblewimble/grin#cf2a65242d9805b0688e40f2432250461aa56561" dependencies = [ "blake2-rfc", "byteorder", @@ -1255,7 +1255,7 @@ dependencies = [ [[package]] name = "grin_keychain" version = "4.2.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#4c6d1dd4bd55e7ee8ad697d008d3292fbf09f99e" +source = "git+https://github.com/mimblewimble/grin#cf2a65242d9805b0688e40f2432250461aa56561" dependencies = [ "blake2-rfc", "byteorder", @@ -1277,7 +1277,7 @@ dependencies = [ [[package]] name = "grin_p2p" version = "4.2.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#4c6d1dd4bd55e7ee8ad697d008d3292fbf09f99e" +source = "git+https://github.com/mimblewimble/grin#cf2a65242d9805b0688e40f2432250461aa56561" dependencies = [ "bitflags 1.2.1", "bytes", @@ -1299,7 +1299,7 @@ dependencies = [ [[package]] name = "grin_pool" version = "4.2.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#4c6d1dd4bd55e7ee8ad697d008d3292fbf09f99e" +source = "git+https://github.com/mimblewimble/grin#cf2a65242d9805b0688e40f2432250461aa56561" dependencies = [ "blake2-rfc", "chrono", @@ -1333,7 +1333,7 @@ dependencies = [ [[package]] name = "grin_store" version = "4.2.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#4c6d1dd4bd55e7ee8ad697d008d3292fbf09f99e" +source = "git+https://github.com/mimblewimble/grin#cf2a65242d9805b0688e40f2432250461aa56561" dependencies = [ "byteorder", "croaring-mw", @@ -1353,7 +1353,7 @@ dependencies = [ [[package]] name = "grin_util" version = "4.2.0-alpha.1" -source = "git+https://github.com/mimblewimble/grin#4c6d1dd4bd55e7ee8ad697d008d3292fbf09f99e" +source = "git+https://github.com/mimblewimble/grin#cf2a65242d9805b0688e40f2432250461aa56561" dependencies = [ "backtrace", "base64 0.12.3", diff --git a/api/src/owner.rs b/api/src/owner.rs index 1c43b75b..1222c7bb 100644 --- a/api/src/owner.rs +++ b/api/src/owner.rs @@ -1410,7 +1410,7 @@ where /// * `chain_type`: The chain type to use in creation of the configuration file. This can be /// * `AutomatedTesting` /// * `UserTesting` - /// * `Floonet` + /// * `Testnet` /// * `Mainnet` /// /// # Returns diff --git a/config/src/config.rs b/config/src/config.rs index b4a02bf8..4a1e64e6 100644 --- a/config/src/config.rs +++ b/config/src/config.rs @@ -213,7 +213,7 @@ impl GlobalWalletConfig { match *chain_type { global::ChainTypes::Mainnet => {} - global::ChainTypes::Floonet => { + global::ChainTypes::Testnet => { defaults.api_listen_port = 13415; defaults.check_node_api_http_addr = "http://127.0.0.1:13413".to_owned(); } diff --git a/impls/src/lifecycle/default.rs b/impls/src/lifecycle/default.rs index 6f3d06c7..1184e1c8 100644 --- a/impls/src/lifecycle/default.rs +++ b/impls/src/lifecycle/default.rs @@ -236,7 +236,7 @@ where ErrorKind::Lifecycle("Error opening wallet (is password correct?)".into()), )?; let keychain = wallet_seed - .derive_keychain(global::is_floonet()) + .derive_keychain(global::is_testnet()) .context(ErrorKind::Lifecycle("Error deriving keychain".into()))?; let mask = wallet.set_keychain(Box::new(keychain), create_mask, use_test_rng)?; diff --git a/impls/src/lifecycle/seed.rs b/impls/src/lifecycle/seed.rs index 6b74b1d1..20619ebd 100644 --- a/impls/src/lifecycle/seed.rs +++ b/impls/src/lifecycle/seed.rs @@ -71,8 +71,8 @@ impl WalletSeed { seed.as_bytes().to_vec() } - pub fn derive_keychain(&self, is_floonet: bool) -> Result { - let result = K::from_seed(&self.0, is_floonet)?; + pub fn derive_keychain(&self, is_testnet: bool) -> Result { + let result = K::from_seed(&self.0, is_testnet)?; Ok(result) } diff --git a/libwallet/src/types.rs b/libwallet/src/types.rs index 73ff271a..df8b59b7 100644 --- a/libwallet/src/types.rs +++ b/libwallet/src/types.rs @@ -56,11 +56,11 @@ where K: Keychain + 'a, { /// Sets the top level system wallet directory - /// default is assumed to be ~/.grin/main/wallet_data (or floonet equivalent) + /// default is assumed to be ~/.grin/main/wallet_data (or testnet equivalent) fn set_top_level_directory(&mut self, dir: &str) -> Result<(), Error>; /// Sets the top level system wallet directory - /// default is assumed to be ~/.grin/main/wallet_data (or floonet equivalent) + /// default is assumed to be ~/.grin/main/wallet_data (or testnet equivalent) fn get_top_level_directory(&self) -> Result; /// Output a grin-wallet.toml file into the current top-level system wallet directory diff --git a/src/bin/grin-wallet.rs b/src/bin/grin-wallet.rs index 68a330c6..0ee2fa5f 100644 --- a/src/bin/grin-wallet.rs +++ b/src/bin/grin-wallet.rs @@ -72,8 +72,8 @@ fn real_main() -> i32 { .version(built_info::PKG_VERSION) .get_matches(); - let chain_type = if args.is_present("floonet") { - global::ChainTypes::Floonet + let chain_type = if args.is_present("testnet") { + global::ChainTypes::Testnet } else if args.is_present("usernet") { global::ChainTypes::UserTesting } else { diff --git a/src/bin/grin-wallet.yml b/src/bin/grin-wallet.yml index 03d34a53..775a6370 100644 --- a/src/bin/grin-wallet.yml +++ b/src/bin/grin-wallet.yml @@ -3,9 +3,9 @@ about: Reference Grin Wallet author: The Grin Team args: - - floonet: - help: Run grin against the Floonet (as opposed to mainnet) - long: floonet + - testnet: + help: Run grin against the Testnet (as opposed to mainnet) + long: testnet takes_value: false - usernet: help: Run grin as a local-only network. Doesn't block peer connections but will not connect to any peer or seed