pub struct BlockValidationConfig {
pub assume_valid_height: u64,
pub assume_valid_hash: Option<[u8; 32]>,
pub n_minimum_chain_work: u128,
pub median_time_past_headers: usize,
pub enable_parallel_validation: bool,
pub coinbase_maturity_override: u64,
pub max_block_sigops_cost_override: u64,
}Expand description
Block validation configuration
Fields§
§assume_valid_height: u64Assume-valid height: blocks before this height skip signature verification
assume_valid_hash: Option<[u8; 32]>Assume-valid block hash: when set, verify block at assume_valid_height matches
n_minimum_chain_work: u128Minimum chain work: skip only when best_header_chainwork >= this
median_time_past_headers: usizeNumber of recent headers for median time-past calculation (BIP113)
enable_parallel_validation: boolEnable parallel transaction validation
coinbase_maturity_override: u64Coinbase maturity override (for testing only)
max_block_sigops_cost_override: u64Maximum block sigop cost override (for testing only)
Trait Implementations§
Source§impl Clone for BlockValidationConfig
impl Clone for BlockValidationConfig
Source§fn clone(&self) -> BlockValidationConfig
fn clone(&self) -> BlockValidationConfig
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 BlockValidationConfig
impl Debug for BlockValidationConfig
Source§impl Default for BlockValidationConfig
impl Default for BlockValidationConfig
Source§fn default() -> BlockValidationConfig
fn default() -> BlockValidationConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BlockValidationConfig
impl<'de> Deserialize<'de> for BlockValidationConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BlockValidationConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BlockValidationConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BlockValidationConfig
impl PartialEq for BlockValidationConfig
Source§fn eq(&self, other: &BlockValidationConfig) -> bool
fn eq(&self, other: &BlockValidationConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BlockValidationConfig
impl Serialize for BlockValidationConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for BlockValidationConfig
impl StructuralPartialEq for BlockValidationConfig
Auto Trait Implementations§
impl Freeze for BlockValidationConfig
impl RefUnwindSafe for BlockValidationConfig
impl Send for BlockValidationConfig
impl Sync for BlockValidationConfig
impl Unpin for BlockValidationConfig
impl UnsafeUnpin for BlockValidationConfig
impl UnwindSafe for BlockValidationConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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