src/main/java/toy/blockchain/Blockchain.java
/**
     * Validate the hash of a given block against another given block,
     * @param prev The block to validate against
     * @param b The block to be validate
     * @return true if valid, false if not
     */
Validate the hash of a given block against another given block,
@param prev The block to validate against
@param b The block to be validate
@return true if valid, false if not
Validate the hash of a given block against another given block @param prev The block to validate against @param b The block to be validate @return true if valid false if not
static public boolean validateBlockHash(Types.Block prev, Types.Block b) {
        byte[] d = DigestMethod.hash(prev.getHeader().toByteArray());
        return DigestMethod.validate(b.getHeader().getPrev().toByteArray(),
                Objects.requireNonNull(d));
    }
static public boolean validateBlockHash ( Types . Block prev , Types . Block b ) { byte [ ] d = DigestMethod . hash ( prev . getHeader ( ) . toByteArray ( ) ) ; return DigestMethod . validate ( b . getHeader ( ) . getPrev ( ) . toByteArray ( ) , Objects . requireNonNull ( d ) ) ; }
Validate the hash of a given block against another given block,
 @param prev The block to validate against
 @param b The block to be validate
 @return true if valid, false if not
Validate the hash of a given block against another given block @param prev The block to validate against @param b The block to be validate @return true if valid false if not