/// prehash: the hash of the block before the pow seal is attached 
/// seal: checks whether the work has been done
/// difficulty: what diffuclty did the author completed this 
/// 
the hash of the block before the pow seal is attached
seal: checks whether the work has been done
difficulty: what diffuclty did the author completed this
the hash of the block before the pow seal is attached seal : checks whether the work has been done difficulty : what diffuclty did the author completed this
fn verify(&self, 
        parent: &BlockId<X>, 
        pre_hash: &H256, 
        pre_digest: Option<&[u8]>,
        seal: &RawSeal,
        difficulty: Self::Difficulty
    ) -> Result<bool, Error<X>> { 
        //  Check that the seal actually meets the target difficulty 
        let seal = {
            if let Ok(seal) = Seal::decode(&mut &seal[..]) { 
                seal
            } else { 
                return Ok(false)
            }
        };
        if !hash_difficulty(&seal.work, difficulty) { 
            return Ok(false)
        }
        let compute = Compute { 
            difficulty,
            pre_hash: *pre_hash,
            nonce: seal.nonce
        };
        if compute.compute() != seal { 
            return Ok(false)
        }
        Ok(true)
    }
fn verify ( & self , parent : & BlockId < X > , pre_hash : & H256 , pre_digest : Option < & [ u8 ] > , seal : & RawSeal , difficulty : Self :: Difficulty ) -> Result < bool , Error < X > > { //  Check that the seal actually meets the target difficulty  let seal = { if let Ok ( seal ) = Seal :: decode ( & mut & seal [ .. ] ) { seal } else { return Ok ( false ) } } ; if ! hash_difficulty ( & seal . work , difficulty ) { return Ok ( false ) } let compute = Compute { difficulty , pre_hash : * pre_hash , nonce : seal . nonce } ; if compute . compute ( ) != seal { return Ok ( false ) } Ok ( true ) }
prehash: the hash of the block before the pow seal is attached
seal: checks whether the work has been done
difficulty: what diffuclty did the author completed this
prehash : the hash of the block before the pow seal is attached seal : checks whether the work has been done difficulty : what diffuclty did the author completed this
&self
parent
&BlockId<X>
pre_hash
&H256
pre_digest
Option<&[u8]>
seal
&RawSeal
difficulty
Self::Difficulty