fn from_str(s: &str) -> Result<Self, Self::Err> {
        let mut checkpoint_list: Vec<(block::Height, block::Hash)> = Vec::new();

        for checkpoint in s.lines() {
            let fields = checkpoint.split(' ').collect::<Vec<_>>();
            if let [height, hash] = fields[..] {
                checkpoint_list.push((height.parse()?, hash.parse()?));
            } else {
                Err(format!("Invalid checkpoint format: expected 2 space-separated fields but found {}: '{}'", fields.len(), checkpoint))?;
            };
        }

        CheckpointList::from_list(checkpoint_list)
    }
/// Parse a string into a CheckpointList.
///
/// Each line has one checkpoint, consisting of a `block::Height` and
/// `block::Hash`, separated by a single space.
///
/// Assumes that the provided genesis checkpoint is correct.
Parse a string into a CheckpointList.
Each line has one checkpoint, consisting of a `block::Height` and
`block::Hash`, separated by a single space.

Assumes that the provided genesis checkpoint is correct.
Parse a string into a CheckpointList . Each line has one checkpoint consisting of a ` block :: Height ` and ` block :: Hash ` separated by a single space . Assumes that the provided genesis checkpoint is correct .
fn from_str(s: &str) -> Result<Self, Self::Err> {
        let mut checkpoint_list: Vec<(block::Height, block::Hash)> = Vec::new();
        for checkpoint in s.lines() {
            let fields = checkpoint.split(' ').collect::<Vec<_>>();
            if let [height, hash] = fields[..] {
                checkpoint_list.push((height.parse()?, hash.parse()?));
            } else {
                Err(format!("Invalid checkpoint format: expected 2 space-separated fields but found {}: '{}'", fields.len(), checkpoint))?;
            };
        }
        CheckpointList::from_list(checkpoint_list)
    }
fn from_str ( s : & str ) -> Result < Self , Self :: Err > { let mut checkpoint_list : Vec < ( block :: Height , block :: Hash ) > = Vec :: new ( ) ; for checkpoint in s . lines ( ) { let fields = checkpoint . split ( ' ' ) . collect :: < Vec < _ > > ( ) ; if let [ height , hash ] = fields [ .. ] { checkpoint_list . push ( ( height . parse ( ) ? , hash . parse ( ) ? ) ) ; } else { Err ( format ! ( " " fields len ( ) checkpoint ) ) ? ; } ; } CheckpointList :: from_list ( checkpoint_list ) }
Parse a string into a CheckpointList.
Parse a string into a CheckpointList .
s
&str