Trait Parameters

Source
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§

Source

fn network_type(&self) -> NetworkType

Returns the type of network configured by this set of consensus parameters.

Source

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§

Source

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

Implementors§

Source§

impl Parameters for Network

Source§

impl Parameters for LocalNetwork

Available on crate feature local-consensus only.

Parameters implementation for LocalNetwork

Source§

impl Parameters for MainNetwork

Source§

impl Parameters for TestNetwork