Fixing block hashing and adding test.