pub trait Parameters: Clone {
// Required methods
fn network_type(&self) -> NetworkType;
fn activation_height(&self, nu: NetworkUpgrade) -> Option<BlockHeight>;
// Provided method
fn is_nu_active(&self, nu: NetworkUpgrade, height: BlockHeight) -> bool { ... }
}
Expand description
Zcash consensus parameters.
Required Methods§
Sourcefn network_type(&self) -> NetworkType
fn network_type(&self) -> NetworkType
Returns the type of network configured by this set of consensus parameters.
Sourcefn activation_height(&self, nu: NetworkUpgrade) -> Option<BlockHeight>
fn activation_height(&self, nu: NetworkUpgrade) -> Option<BlockHeight>
Returns the activation height for a particular network upgrade, if an activation height has been set.
Provided Methods§
Sourcefn is_nu_active(&self, nu: NetworkUpgrade, height: BlockHeight) -> bool
fn is_nu_active(&self, nu: NetworkUpgrade, height: BlockHeight) -> bool
Determines whether the specified network upgrade is active as of the provided block height on the network to which this Parameters value applies.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<P: Parameters> Parameters for &P
impl<P: Parameters> Parameters for &P
fn network_type(&self) -> NetworkType
fn activation_height(&self, nu: NetworkUpgrade) -> Option<BlockHeight>
Implementors§
impl Parameters for Network
impl Parameters for LocalNetwork
Available on crate feature
local-consensus
only.Parameters implementation for LocalNetwork