BlockhashRegistry - recreateBlockheaders allows invalid parent hashes for intermediary blocks
It is assumed that a blockhash of `0x00` is invalid, but the method accepts intermediary parent hashes extracted from blockheaders that are zero when establishing the trust chain.\\n`recreateBlockheaders` relies on `reCalculateBlockheaders` to correctly establish a chain of trust from the provided list of `_blockheaders` to a valid blockhash stored in the contract. However, `reCalculateBlockheaders` fails to raise an exception in case `getParentAndBlockhash` returns a blockhash of `0x00`. Subsequently it will skip over invalid blockhashes and continue to establish the trust chain without raising an error.\\nThis may allow an attacker with enough hashing power to store a blockheader hash that is actually invalid on the real chain but accepted within this smart contract. This may even only be done temporarily to overwrite an existing hash for a short period of time (see https://github.com/ConsenSys/slockit-in3-audit-2019-09/issues/24).\\n```\\nfor (uint i = 0; i < \\_blockheaders.length; i++) {\\n    (calcParent, calcBlockhash) = getParentAndBlockhash(\\_blockheaders[i]);\\n    if (calcBlockhash != currentBlockhash) {\\n        return 0x0;\\n    }\\n    currentBlockhash = calcParent;\\n}\\n```\\n
Stop processing the array of `_blockheaders` immediately if a blockheader is invalid.
```\\nfor (uint i = 0; i < \\_blockheaders.length; i++) {\\n    (calcParent, calcBlockhash) = getParentAndBlockhash(\\_blockheaders[i]);\\n    if (calcBlockhash != currentBlockhash) {\\n        return 0x0;\\n    }\\n    currentBlockhash = calcParent;\\n}\\n```\\n