Skip to content

Commit 32355d3

Browse files
authored
Remove outdated ChainId::root references, and an unused file. (#4644)
## Motivation Since the introduction of chain description blobs, `ChainId::root` doesn't exist anymore, but there are still a few references to it. Also, `applications_tests` isn't used anymore. It probably became obsolete with the introduction of application blobs? ## Proposal Fix the references and remove the unused file. ## Test Plan CI ## Release Plan - These changes _could_ be backported to `testnet_conway`. ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent dfbe97f commit 32355d3

File tree

4 files changed

+6
-90
lines changed

4 files changed

+6
-90
lines changed

CLI.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,10 +1210,10 @@ Start a Local Linera Network
12101210
* `--external-protocol <EXTERNAL_PROTOCOL>` — External protocol used, either `grpc` or `grpcs`
12111211

12121212
Default value: `grpc`
1213-
* `--with-faucet` — If present, a faucet is started using the chain provided by --faucet-chain, or `ChainId::root(1)` if not provided, as root 0 is usually the admin chain
1213+
* `--with-faucet` — If present, a faucet is started using the chain provided by --faucet-chain, or the first non-admin chain if not provided
12141214

12151215
Default value: `false`
1216-
* `--faucet-chain <FAUCET_CHAIN>` — When using --with-faucet, this specifies the chain on which the faucet will be started. The chain is specified by its root number (0 for the admin chain, 1 for the first non-admin initial chain, etc)
1216+
* `--faucet-chain <FAUCET_CHAIN>` — When using --with-faucet, this specifies the chain on which the faucet will be started. If this is `n`, the `n`-th non-admin chain (lexicographically) in the wallet is selected
12171217
* `--faucet-port <FAUCET_PORT>` — The port on which to run the faucet server
12181218

12191219
Default value: `8080`

linera-core/src/unit_tests/worker_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,7 +1725,7 @@ where
17251725
.inboxes
17261726
.try_load_entry(&chain_3)
17271727
.await?
1728-
.expect("Missing inbox for `chain_3` in `ChainId::root(1)`");
1728+
.expect("Missing inbox for `chain_3` in `chain_1`");
17291729
assert_eq!(BlockHeight::ZERO, inbox.next_block_height_to_receive()?);
17301730
assert_eq!(inbox.added_bundles.count(), 0);
17311731
assert_matches!(
@@ -1993,7 +1993,7 @@ where
19931993
.inboxes
19941994
.try_load_entry(&chain_1)
19951995
.await?
1996-
.expect("Missing inbox for `ChainId::root(1)` in `chain_2`");
1996+
.expect("Missing inbox for `chain_1` in `chain_2`");
19971997
assert_eq!(BlockHeight::from(1), inbox.next_block_height_to_receive()?);
19981998
assert_matches!(
19991999
inbox

linera-execution/src/unit_tests/applications_tests.rs

Lines changed: 0 additions & 83 deletions
This file was deleted.

linera-service/src/cli/command.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,13 +1128,12 @@ pub enum NetCommand {
11281128
external_protocol: String,
11291129

11301130
/// If present, a faucet is started using the chain provided by --faucet-chain, or
1131-
/// `ChainId::root(1)` if not provided, as root 0 is usually the admin chain.
1131+
/// the first non-admin chain if not provided.
11321132
#[arg(long, default_value = "false")]
11331133
with_faucet: bool,
11341134

11351135
/// When using --with-faucet, this specifies the chain on which the faucet will be started.
1136-
/// The chain is specified by its root number (0 for the admin chain, 1 for the first
1137-
/// non-admin initial chain, etc).
1136+
/// If this is `n`, the `n`-th non-admin chain (lexicographically) in the wallet is selected.
11381137
#[arg(long)]
11391138
faucet_chain: Option<u32>,
11401139

0 commit comments

Comments
 (0)