<code>blockhash</code> function returns a non-zero value only for 256 last blocks. Besides, it always returns 0 for the current block, i.e. <code>blockhash(block.number)</code> always equals to 0.
[Click Here](https://astexplorer.net/#/gist/68f4866e7f27e43b61182f734ef3d8d3/6c6915df0b7dddb6688e8eb8415b89d22dd8082b) to view the AST for the above code. Code generated from AST Explorer using _solidity-parser-antlr-0.4.11_