diff --git a/Cargo.lock b/Cargo.lock index 849e52446a..17601d068f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10663,6 +10663,7 @@ dependencies = [ "infra_utils", "mempool_test_utils", "papyrus_config", + "papyrus_consensus", "papyrus_proc_macros", "pretty_assertions", "rstest", diff --git a/crates/starknet_integration_tests/src/utils.rs b/crates/starknet_integration_tests/src/utils.rs index 2de241332c..b4e824ccf5 100644 --- a/crates/starknet_integration_tests/src/utils.rs +++ b/crates/starknet_integration_tests/src/utils.rs @@ -7,7 +7,7 @@ use blockifier::test_utils::contracts::FeatureContract; use blockifier::test_utils::{CairoVersion, RunnableCairo1}; use mempool_test_utils::starknet_api_test_utils::{AccountId, MultiAccountTransactionGenerator}; use papyrus_consensus::config::ConsensusConfig; -use papyrus_consensus::types::ValidatorId; +use papyrus_consensus::types::{ValidatorId, DEFAULT_VALIDATOR_ID}; use papyrus_network::network_manager::test_utils::create_network_configs_connected_to_broadcast_channels; use papyrus_network::network_manager::BroadcastTopicChannels; use papyrus_protobuf::consensus::{ProposalPart, StreamMessage}; @@ -75,7 +75,7 @@ pub async fn create_config( chain_id: chain_info.chain_id, eth_fee_token_address: fee_token_addresses.eth_fee_token_address, strk_fee_token_address: fee_token_addresses.strk_fee_token_address, - validator_id: ContractAddress::from(100_u128), + validator_id: ContractAddress::from(DEFAULT_VALIDATOR_ID), }, ) } diff --git a/crates/starknet_sequencer_node/Cargo.toml b/crates/starknet_sequencer_node/Cargo.toml index 29aa72a10a..aff6d868ec 100644 --- a/crates/starknet_sequencer_node/Cargo.toml +++ b/crates/starknet_sequencer_node/Cargo.toml @@ -18,6 +18,7 @@ const_format.workspace = true futures.workspace = true infra_utils.workspace = true papyrus_config.workspace = true +papyrus_consensus.workspace = true papyrus_proc_macros = { workspace = true, optional = true } rstest.workspace = true serde.workspace = true diff --git a/crates/starknet_sequencer_node/src/config/test_utils.rs b/crates/starknet_sequencer_node/src/config/test_utils.rs index cf34e52152..584fd04714 100644 --- a/crates/starknet_sequencer_node/src/config/test_utils.rs +++ b/crates/starknet_sequencer_node/src/config/test_utils.rs @@ -1,5 +1,6 @@ use std::vec::Vec; // Used by #[gen_field_names_fn]. +use papyrus_consensus::types::DEFAULT_VALIDATOR_ID; use papyrus_proc_macros::gen_field_names_and_cli_args_fn; use starknet_api::core::{ChainId, ContractAddress}; @@ -20,7 +21,7 @@ impl RequiredParams { chain_id: ChainId::create_for_testing(), eth_fee_token_address: ContractAddress::from(2_u128), strk_fee_token_address: ContractAddress::from(3_u128), - validator_id: ContractAddress::from(100_u128), + validator_id: ContractAddress::from(DEFAULT_VALIDATOR_ID), } } }