pub struct ConsensusConfig {
pub network_limits: NetworkMessageLimits,
pub block_validation: BlockValidationConfig,
pub mempool: MempoolConfig,
pub utxo_commitment: UtxoCommitmentConfig,
pub performance: PerformanceConfig,
pub debug: DebugConfig,
pub features: FeatureFlagsConfig,
pub advanced: AdvancedConfig,
}Expand description
Complete consensus configuration
Fields§
§network_limits: NetworkMessageLimitsNetwork message size limits
block_validation: BlockValidationConfigBlock validation configuration
mempool: MempoolConfigMempool configuration
utxo_commitment: UtxoCommitmentConfigUTXO commitment set configuration
performance: PerformanceConfigPerformance and optimization configuration
debug: DebugConfigDebug and development configuration
features: FeatureFlagsConfigFeature flags configuration
advanced: AdvancedConfigAdvanced configuration options
Implementations§
Source§impl ConsensusConfig
impl ConsensusConfig
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Load configuration from environment variables
Environment variables. Short names (e.g. BLVM_ASSUME_VALID_HEIGHT) preferred.
Sourcepub fn get_assume_valid_height(&self) -> u64
pub fn get_assume_valid_height(&self) -> u64
Get assume-valid height (respects benchmarking override if enabled)
Trait Implementations§
Source§impl Clone for ConsensusConfig
impl Clone for ConsensusConfig
Source§fn clone(&self) -> ConsensusConfig
fn clone(&self) -> ConsensusConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConsensusConfig
impl Debug for ConsensusConfig
Source§impl Default for ConsensusConfig
impl Default for ConsensusConfig
Source§fn default() -> ConsensusConfig
fn default() -> ConsensusConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConsensusConfig
impl<'de> Deserialize<'de> for ConsensusConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ConsensusConfig
impl PartialEq for ConsensusConfig
Source§fn eq(&self, other: &ConsensusConfig) -> bool
fn eq(&self, other: &ConsensusConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ConsensusConfig
impl Serialize for ConsensusConfig
impl StructuralPartialEq for ConsensusConfig
Auto Trait Implementations§
impl Freeze for ConsensusConfig
impl RefUnwindSafe for ConsensusConfig
impl Send for ConsensusConfig
impl Sync for ConsensusConfig
impl Unpin for ConsensusConfig
impl UnsafeUnpin for ConsensusConfig
impl UnwindSafe for ConsensusConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more