pub fn validate_proof(&self, nonce: &[u8], key: u64) -> bool {
        let mut data = self.create_proof_data(nonce);
        for _ in 0..key {
            data.push_front(0u8);
        }
        self.check_hash(&data) >= self.difficulty
    }
/// Validate the proof key (this must recreate the data, hence `validate_all` is faster when
/// both must be checked).
Validate the proof key (this must recreate the data, hence `validate_all` is faster when
both must be checked).
Validate the proof key ( this must recreate the data hence ` validate_all ` is faster when both must be checked ) .
pub fn validate_proof(&self, nonce: &[u8], key: u64) -> bool {
        let mut data = self.create_proof_data(nonce);
        for _ in 0..key {
            data.push_front(0u8);
        }
        self.check_hash(&data) >= self.difficulty
    }
pub fn validate_proof ( & self , nonce : & [ u8 ] , key : u64 ) -> bool { let mut data = self . create_proof_data ( nonce ) ; for _ in 0 .. key { data . push_front ( 0u8 ) ; } self . check_hash ( & data ) >= self . difficulty }
Validate the proof key (this must recreate the data, hence `validate_all` is faster when
both must be checked).
Validate the proof key ( this must recreate the data hence ` validate_all ` is faster when both must be checked ) .
&self
nonce
&[u8]
key
u64
&self
nonce
&[u8]
key
u64