Skip to content

Commit

Permalink
Fix missed renames
Browse files Browse the repository at this point in the history
  • Loading branch information
deuszx committed Feb 19, 2025
1 parent 7471c40 commit 1c45355
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/rust-toolchain.toml
4 changes: 2 additions & 2 deletions linera-client/src/client_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ pub enum ClientCommand {
SetValidator {
/// The public key of the validator.
#[arg(long)]
name: ValidatorPublicKey,
validator: ValidatorPublicKey,

/// Network address
#[arg(long)]
Expand All @@ -494,7 +494,7 @@ pub enum ClientCommand {
RemoveValidator {
/// The public key of the validator.
#[arg(long)]
name: ValidatorPublicKey,
validator: ValidatorPublicKey,
},

/// Deprecates all committees except the last one.
Expand Down
2 changes: 1 addition & 1 deletion linera-client/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ util::impl_from_dynamic!(Error:Persistence, persistent::file::Error);
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct ValidatorConfig {
/// The public key of the validator.
pub name: ValidatorPublicKey,
pub validator: ValidatorPublicKey,
/// The network configuration for the validator.
pub network: ValidatorPublicNetworkConfig,
}
Expand Down
2 changes: 1 addition & 1 deletion linera-core/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3502,7 +3502,7 @@ impl Drop for AbortOnDrop {
/// The result of `synchronize_received_certificates_from_validator`.
struct ReceivedCertificatesFromValidator {
/// The name of the validator we downloaded from.
name: ValidatorPublicKey,
validator: ValidatorPublicKey,
/// The new tracker value for that validator.
tracker: u64,
/// The downloaded certificates. The signatures were already checked and they are ready
Expand Down
2 changes: 1 addition & 1 deletion linera-core/src/remote_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::{
/// A validator node together with the validator's name.
#[derive(Clone, Debug)]
pub struct RemoteNode<N> {
pub name: ValidatorPublicKey,
pub validator: ValidatorPublicKey,
#[debug(skip)]
pub node: N,
}
Expand Down
2 changes: 1 addition & 1 deletion linera-core/src/unit_tests/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ impl<S> LocalValidatorClient<S>
where
S: Storage + Clone + Send + Sync + 'static,
{
fn new(name: ValidatorPublicKey, state: WorkerState<S>) -> Self {
fn new(validator: ValidatorPublicKey, state: WorkerState<S>) -> Self {
let client = LocalValidator {
fault_type: FaultType::Honest,
state,
Expand Down
2 changes: 1 addition & 1 deletion linera-core/src/unit_tests/worker_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3742,7 +3742,7 @@ where
// Now we are in fallback mode, and the validator is the leader.
let (response, _) = worker.handle_chain_info_query(query.clone()).await?;
let manager = response.info.manager;
let validator_key = worker.public_key();
let public_key = worker.public_key();
assert_eq!(manager.current_round, Round::Validator(0));
assert_eq!(manager.leader, Some(Owner::from(validator_key)));
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion linera-faucet/server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub struct ClaimOutcome {

#[derive(Debug, Deserialize, SimpleObject)]
pub struct Validator {
pub name: ValidatorPublicKey,
pub validator: ValidatorPublicKey,
pub network_address: String,
}

Expand Down
2 changes: 1 addition & 1 deletion linera-rpc/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub type ValidatorPublicNetworkConfig = ValidatorPublicNetworkPreConfig<NetworkP
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct ValidatorInternalNetworkPreConfig<P> {
/// The public key of the validator.
pub name: ValidatorPublicKey,
pub validator: ValidatorPublicKey,
/// The network protocol to use for all shards.
pub protocol: P,
/// The available shards. Each chain UID is mapped to a unique shard in the vector in
Expand Down
2 changes: 1 addition & 1 deletion linera-rpc/src/grpc/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ pub mod tests {

#[test]
pub fn validator_public_key() {
let validator_key = ValidatorPublicKey::from(ValidatorSecretKey::generate().public());
let public_key = ValidatorPublicKey::from(ValidatorSecretKey::generate().public());
// This is a correct comparison - `ValidatorNameRpc` does not exist in our
// proto definitions.
round_trip_check::<_, api::PublicKey>(validator_key);
Expand Down

0 comments on commit 1c45355

Please sign in to comment.