pub fn new(network: Network) -> Self {
        // parse calls CheckpointList::from_list
        let checkpoint_list: CheckpointList = match network {
            Network::Mainnet => MAINNET_CHECKPOINTS
                .parse()
                .expect("Hard-coded Mainnet checkpoint list parses and validates"),
            Network::Testnet => TESTNET_CHECKPOINTS
                .parse()
                .expect("Hard-coded Testnet checkpoint list parses and validates"),
        };

        match checkpoint_list.hash(block::Height(0)) {
            Some(hash) if hash == genesis_hash(network) => checkpoint_list,
            Some(_) => {
                panic!("The hard-coded genesis checkpoint does not match the network genesis hash")
            }
            None => unreachable!("Parser should have checked for a missing genesis checkpoint"),
        }
    }
/// Returns the hard-coded checkpoint list for `network`.
Returns the hard-coded checkpoint list for `network`.
Returns the hard - coded checkpoint list for ` network ` .
pub fn new(network: Network) -> Self {
        // parse calls CheckpointList::from_list
        let checkpoint_list: CheckpointList = match network {
            Network::Mainnet => MAINNET_CHECKPOINTS
                .parse()
                .expect("Hard-coded Mainnet checkpoint list parses and validates"),
            Network::Testnet => TESTNET_CHECKPOINTS
                .parse()
                .expect("Hard-coded Testnet checkpoint list parses and validates"),
        };
        match checkpoint_list.hash(block::Height(0)) {
            Some(hash) if hash == genesis_hash(network) => checkpoint_list,
            Some(_) => {
                panic!("The hard-coded genesis checkpoint does not match the network genesis hash")
            }
            None => unreachable!("Parser should have checked for a missing genesis checkpoint"),
        }
    }
pub fn new ( network : Network ) -> Self { // parse calls CheckpointList::from_list let checkpoint_list : CheckpointList = match network { Network :: Mainnet => MAINNET_CHECKPOINTS . parse ( ) . expect ( " " ) , Network :: Testnet => TESTNET_CHECKPOINTS . parse ( ) . expect ( " " ) , } ; match checkpoint_list . hash ( block :: Height ( 0 ) ) { Some ( hash ) if hash == genesis_hash ( network ) => checkpoint_list , Some ( _ ) => { panic ! ( " " ) } None => unreachable ! ( " " ) , } }
Returns the hard-coded checkpoint list for `network`.
Returns the hard - coded checkpoint list for ` network ` .
network
Network