Skip to content

Commit

Permalink
[Consensus Observer] Rename ObserverConfig -> ConsensusObserverConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLind committed Jun 4, 2024
1 parent 02896bc commit 2a70887
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize};

#[derive(Default, Clone, Copy, Debug, Deserialize, PartialEq, Serialize)]
#[serde(default, deny_unknown_fields)]
pub struct ObserverConfig {
pub struct ConsensusObserverConfig {
pub observer_enabled: bool,
pub publisher_enabled: bool,
}
4 changes: 2 additions & 2 deletions config/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ mod base_config;
mod config_optimizer;
mod config_sanitizer;
mod consensus_config;
mod consensus_observer_config;
mod dag_consensus_config;
mod dkg_config;
mod error;
Expand All @@ -27,7 +28,6 @@ mod network_config;
mod node_config;
mod node_config_loader;
mod node_startup_config;
mod observer_config;
mod override_node_config;
mod peer_monitoring_config;
mod persistable_config;
Expand All @@ -44,6 +44,7 @@ pub use admin_service_config::*;
pub use api_config::*;
pub use base_config::*;
pub use consensus_config::*;
pub use consensus_observer_config::*;
pub use dag_consensus_config::*;
pub use error::*;
pub use execution_config::*;
Expand All @@ -59,7 +60,6 @@ pub use netbench_config::*;
pub use network_config::*;
pub use node_config::*;
pub use node_config_loader::sanitize_node_config;
pub use observer_config::*;
pub use override_node_config::*;
pub use peer_monitoring_config::*;
pub use persistable_config::*;
Expand Down
8 changes: 4 additions & 4 deletions config/src/config/node_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
use super::{DagConsensusConfig, IndexerTableInfoConfig};
use crate::{
config::{
dkg_config::DKGConfig, jwk_consensus_config::JWKConsensusConfig,
netbench_config::NetbenchConfig, node_config_loader::NodeConfigLoader,
node_startup_config::NodeStartupConfig, observer_config::ObserverConfig,
consensus_observer_config::ConsensusObserverConfig, dkg_config::DKGConfig,
jwk_consensus_config::JWKConsensusConfig, netbench_config::NetbenchConfig,
node_config_loader::NodeConfigLoader, node_startup_config::NodeStartupConfig,
persistable_config::PersistableConfig, utils::RootPath, AdminServiceConfig, ApiConfig,
BaseConfig, ConsensusConfig, Error, ExecutionConfig, IndexerConfig, IndexerGrpcConfig,
InspectionServiceConfig, LoggerConfig, MempoolConfig, NetworkConfig,
Expand Down Expand Up @@ -42,7 +42,7 @@ pub struct NodeConfig {
#[serde(default)]
pub consensus: ConsensusConfig,
#[serde(default)]
pub consensus_observer: ObserverConfig,
pub consensus_observer: ConsensusObserverConfig,
#[serde(default)]
pub dag_consensus: DagConsensusConfig,
#[serde(default)]
Expand Down
6 changes: 3 additions & 3 deletions state-sync/state-sync-driver/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::{
utils,
utils::{OutputFallbackHandler, PENDING_DATA_LOG_FREQ_SECS},
};
use aptos_config::config::{ObserverConfig, RoleType, StateSyncDriverConfig};
use aptos_config::config::{ConsensusObserverConfig, RoleType, StateSyncDriverConfig};
use aptos_consensus_notifications::{
ConsensusCommitNotification, ConsensusNotification, ConsensusSyncNotification,
};
Expand Down Expand Up @@ -54,7 +54,7 @@ pub struct DriverConfiguration {
pub config: StateSyncDriverConfig,

// The config for consensus observer
pub consensus_observer_config: ObserverConfig,
pub consensus_observer_config: ConsensusObserverConfig,

// The role of the node
pub role: RoleType,
Expand All @@ -66,7 +66,7 @@ pub struct DriverConfiguration {
impl DriverConfiguration {
pub fn new(
config: StateSyncDriverConfig,
consensus_observer_config: ObserverConfig,
consensus_observer_config: ConsensusObserverConfig,
role: RoleType,
waypoint: Waypoint,
) -> Self {
Expand Down
4 changes: 2 additions & 2 deletions state-sync/state-sync-driver/src/tests/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: Apache-2.0

use crate::driver::DriverConfiguration;
use aptos_config::config::{ObserverConfig, RoleType, StateSyncDriverConfig};
use aptos_config::config::{ConsensusObserverConfig, RoleType, StateSyncDriverConfig};
use aptos_crypto::{
ed25519::{Ed25519PrivateKey, Ed25519Signature},
HashValue, PrivateKey, Uniform,
Expand Down Expand Up @@ -84,7 +84,7 @@ pub fn create_event(event_key: Option<EventKey>) -> ContractEvent {
/// Creates a test driver configuration for full nodes
pub fn create_full_node_driver_configuration() -> DriverConfiguration {
let config = StateSyncDriverConfig::default();
let consensus_observer_config = ObserverConfig::default();
let consensus_observer_config = ConsensusObserverConfig::default();
let role = RoleType::FullNode;
let waypoint = Waypoint::default();

Expand Down

0 comments on commit 2a70887

Please sign in to comment.