pub fn all_blocks_in_longest_chain(&self) -> Vec<H256> {
        let mut trav = self.tip;
        let mut longest_chain = Vec::new();
        let target = [0u8; 32].into();
        while trav != target {
            longest_chain.push(trav);
            let cur_b = &self.blockmap[&trav];
            trav = cur_b.header.parent;
        }
        return longest_chain;
    }
/// Get the last block's hash of the longest chain
// #[cfg(any(test, test_utilities))]
Get the last block's hash of the longest chain
Get the last block ' s hash of the longest chain
pub fn all_blocks_in_longest_chain(&self) -> Vec<H256> {
        let mut trav = self.tip;
        let mut longest_chain = Vec::new();
        let target = [0u8; 32].into();
        while trav != target {
            longest_chain.push(trav);
            let cur_b = &self.blockmap[&trav];
            trav = cur_b.header.parent;
        }
        return longest_chain;
    }
pub fn all_blocks_in_longest_chain ( & self ) -> Vec < H256 > { let mut trav = self . tip ; let mut longest_chain = Vec :: new ( ) ; let target = [ 0u8 ; 32 ] . into ( ) ; while trav != target { longest_chain . push ( trav ) ; let cur_b = & self . blockmap [ & trav ] ; trav = cur_b . header . parent ; } return longest_chain ; }
Get the last block's hash of the longest chain
Get the last block ' s hash of the longest chain
&self
[cfg(any(test, test_utilities))]
None