diff --git a/stacks-signer/src/stacks_client.rs b/stacks-signer/src/stacks_client.rs index ec1a4bc037..f555a3f998 100644 --- a/stacks-signer/src/stacks_client.rs +++ b/stacks-signer/src/stacks_client.rs @@ -8,7 +8,10 @@ use stacks_common::{debug, types::chainstate::StacksPrivateKey, warn}; use crate::config::Config; -const SLOTS_PER_USER: u32 = 10; +/// Temporary placeholder for the number of slots allocated to a stacker-db writer. This will be retrieved from the stacker-db instance in the future +/// See: https://github.com/stacks-network/stacks-blockchain/issues/3921 +/// Is equal to the number of message types +pub const SLOTS_PER_USER: u32 = 10; #[derive(thiserror::Error, Debug)] /// Client error type diff --git a/stacks-signer/src/utils.rs b/stacks-signer/src/utils.rs index c70881ce1b..e45ac56b59 100644 --- a/stacks-signer/src/utils.rs +++ b/stacks-signer/src/utils.rs @@ -7,6 +7,8 @@ use stacks_common::{ }; use wsts::Scalar; +use crate::stacks_client::SLOTS_PER_USER; + /// Helper function for building a signer config for each provided signer private key pub fn build_signer_config_tomls( signer_stacks_private_keys: &[StacksPrivateKey], @@ -90,7 +92,8 @@ pub fn build_stackerdb_contract(signer_stacks_addresses: &[StacksAddress]) -> St stackerdb_contract += " {\n"; stackerdb_contract += format!(" signer: '{},\n", signer_stacks_address).as_str(); - stackerdb_contract += format!(" num-slots: u{}\n", 10).as_str(); // We only have 10 Message Types + stackerdb_contract += + format!(" num-slots: u{}\n", SLOTS_PER_USER).as_str(); stackerdb_contract += " }\n"; } stackerdb_contract += " )))\n";