diff --git a/Cargo.lock b/Cargo.lock index d57ab8f4f9..10753063a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10638,6 +10638,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 c0d3f452be..731082159e 100644 --- a/crates/starknet_integration_tests/src/utils.rs +++ b/crates/starknet_integration_tests/src/utils.rs @@ -7,6 +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::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}; @@ -63,7 +64,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), }, consensus_proposals_channels, ) 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), } } }