Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed bug with encoder

  • Loading branch information...
commit 94a2205abc5b1c59869c531671ae3413c7172177 1 parent 4e060dd
@dave-andersen authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/momentum.cpp
View
3  src/momentum.cpp
@@ -119,8 +119,8 @@ namespace bts
void generate_hashes(pow_seed_type head, uint64_t *hashStore, uint32_t *hashCounts)
{
+ fc::sha512::encoder enc;
for ( uint32_t n = 0; n < MAX_MOMENTUM_NONCE; n += (BIRTHDAYS_PER_HASH)) {
- fc::sha512::encoder enc;
enc.write( (char*)&n, sizeof(n));
enc.write( (char *)&head, sizeof(head));
auto result = enc.result();
@@ -128,6 +128,7 @@ namespace bts
for (uint32_t i = 0; i < BIRTHDAYS_PER_HASH; i++) {
put_hash_in_bucket((result._hash[i] >> (64 - SEARCH_SPACE_BITS)), hashStore, hashCounts, n+i);
}
+ enc.reset();
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.