Bring blockhash.py on par with JS implementation.