Trait Parameters

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§

fn network_type(&self) -> NetworkType

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

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§

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§

§

impl<P> Parameters for &P
where P: Parameters,

Implementors§

§

impl Parameters for Network

§

impl Parameters for MainNetwork

§

impl Parameters for TestNetwork

§

impl Parameters for LocalNetwork

Parameters implementation for LocalNetwork