fn activation_extremes(network: Network) {
    // The first three upgrades are Genesis, BeforeOverwinter, and Overwinter
    assert_eq!(
        NetworkUpgrade::activation_list(network).get(&block::Height(0)),
        Some(&Genesis)
    );
    assert_eq!(Genesis.activation_height(network), Some(block::Height(0)));
    assert_eq!(NetworkUpgrade::current(network, block::Height(0)), Genesis);
    assert_eq!(
        NetworkUpgrade::next(network, block::Height(0)),
        Some(BeforeOverwinter)
    );

    assert_eq!(
        NetworkUpgrade::activation_list(network).get(&block::Height(1)),
        Some(&BeforeOverwinter)
    );
    assert_eq!(
        BeforeOverwinter.activation_height(network),
        Some(block::Height(1))
    );
    assert_eq!(
        NetworkUpgrade::current(network, block::Height(1)),
        BeforeOverwinter
    );
    assert_eq!(
        NetworkUpgrade::next(network, block::Height(1)),
        Some(Overwinter)
    );

    // We assume that the last upgrade we know about continues forever
    // (even if we suspect that won't be true)
    assert_ne!(
        NetworkUpgrade::activation_list(network).get(&block::Height::MAX),
        Some(&Genesis)
    );
    assert_ne!(
        NetworkUpgrade::current(network, block::Height::MAX),
        Genesis
    );
    assert_eq!(NetworkUpgrade::next(network, block::Height::MAX), None);
}
/// Test the activation_list, activation_height, current, and next functions
/// for `network` with extreme values.
Test the activation_list, activation_height, current, and next functions
for `network` with extreme values.
Test the activation_list activation_height current and next functions for ` network ` with extreme values .
fn activation_extremes(network: Network) {
    // The first three upgrades are Genesis, BeforeOverwinter, and Overwinter
    assert_eq!(
        NetworkUpgrade::activation_list(network).get(&block::Height(0)),
        Some(&Genesis)
    );
    assert_eq!(Genesis.activation_height(network), Some(block::Height(0)));
    assert_eq!(NetworkUpgrade::current(network, block::Height(0)), Genesis);
    assert_eq!(
        NetworkUpgrade::next(network, block::Height(0)),
        Some(BeforeOverwinter)
    );
    assert_eq!(
        NetworkUpgrade::activation_list(network).get(&block::Height(1)),
        Some(&BeforeOverwinter)
    );
    assert_eq!(
        BeforeOverwinter.activation_height(network),
        Some(block::Height(1))
    );
    assert_eq!(
        NetworkUpgrade::current(network, block::Height(1)),
        BeforeOverwinter
    );
    assert_eq!(
        NetworkUpgrade::next(network, block::Height(1)),
        Some(Overwinter)
    );
    // We assume that the last upgrade we know about continues forever
    // (even if we suspect that won't be true)
    assert_ne!(
        NetworkUpgrade::activation_list(network).get(&block::Height::MAX),
        Some(&Genesis)
    );
    assert_ne!(
        NetworkUpgrade::current(network, block::Height::MAX),
        Genesis
    );
    assert_eq!(NetworkUpgrade::next(network, block::Height::MAX), None);
}
fn activation_extremes ( network : Network ) { // The first three upgrades are Genesis, BeforeOverwinter, and Overwinter assert_eq ! ( NetworkUpgrade activation_list ( network ) get ( block Height ( 0 ) ) Some ( Genesis ) ) ; assert_eq ! ( Genesis activation_height ( network ) Some ( block Height ( 0 ) ) ) ; assert_eq ! ( NetworkUpgrade current ( network block Height ( 0 ) ) Genesis ) ; assert_eq ! ( NetworkUpgrade next ( network block Height ( 0 ) ) Some ( BeforeOverwinter ) ) ; assert_eq ! ( NetworkUpgrade activation_list ( network ) get ( block Height ( 1 ) ) Some ( BeforeOverwinter ) ) ; assert_eq ! ( BeforeOverwinter activation_height ( network ) Some ( block Height ( 1 ) ) ) ; assert_eq ! ( NetworkUpgrade current ( network block Height ( 1 ) ) BeforeOverwinter ) ; assert_eq ! ( NetworkUpgrade next ( network block Height ( 1 ) ) Some ( Overwinter ) ) ; // We assume that the last upgrade we know about continues forever // (even if we suspect that won't be true) assert_ne ! ( NetworkUpgrade activation_list ( network ) get ( block Height MAX ) Some ( Genesis ) ) ; assert_ne ! ( NetworkUpgrade current ( network block Height MAX ) Genesis ) ; assert_eq ! ( NetworkUpgrade next ( network block Height MAX ) None ) ; }
Test the activation_list, activation_height, current, and next functions
for `network` with extreme values.
Test the activation_list activation_height current and next functions for ` network ` with extreme values .
network
Network