Permalink
Browse files

hardcoded 80 as block header size

  • Loading branch information...
santoslluis committed Aug 21, 2017
1 parent 2b0aff7 commit 22beaf1f133a3da60e68f796fde106f34bf0f0d2
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/hash.h
@@ -191,10 +191,8 @@ uint256 SerializeKeccakHash(const T& obj) {
sph_keccak256_context ctx_keccak;
uint256 hash;
printf("DEBUG::sizeof(T) = %d\n", sizeof(T));
sph_keccak256_init(&ctx_keccak);
sph_keccak256(&ctx_keccak, (void*)&*BEGIN(obj), sizeof(T));
sph_keccak256(&ctx_keccak, (void*)&*BEGIN(obj), 80); // sizeof(CBlockHeader) = 80 bytes
sph_keccak256_close(&ctx_keccak, static_cast<void*>(&hash));
return hash;

0 comments on commit 22beaf1

Please sign in to comment.