diff --git a/ethash.h b/ethash.h index bcbe2d7ef..63e58612c 100644 --- a/ethash.h +++ b/ethash.h @@ -27,13 +27,13 @@ #include "compiler.h" #define REVISION 20 -#define DAGSIZE_BYTES_INIT 1073741824U // 2**30 -#define DAG_GROWTH 8388608U // 2**23 +#define DATASET_BYTES_INIT 1073741824U // 2**30 +#define DATASET_BYTES_GROWTH 8388608U // 2**23 #define CACHE_MULTIPLIER 1024 #define EPOCH_LENGTH 30000U #define MIX_BYTES 128 #define HASH_BYTES 64 -#define DAG_PARENTS 256 +#define DATASET_PARENTS 256 #define CACHE_ROUNDS 3 #define ACCESSES 64 diff --git a/internal.c b/internal.c index 3144bf8d6..0a7e767e7 100644 --- a/internal.c +++ b/internal.c @@ -114,7 +114,7 @@ void ethash_calculate_dag_item( __m128i xmm3 = ret->xmm[3]; #endif - for (unsigned i = 0; i != DAG_PARENTS; ++i) { + for (unsigned i = 0; i != DATASET_PARENTS; ++i) { uint32_t parent_index = ((node_index ^ i) * FNV_PRIME ^ ret->words[i % NODE_WORDS]) % num_parent_nodes; node const *parent = &cache_nodes[parent_index]; @@ -274,9 +274,9 @@ void ethash_quick_hash( } void ethash_get_seedhash(uint8_t seedhash[32], const uint32_t block_number) { - memset(seedhash,0,32); + memset(seedhash, 0, 32); const uint32_t epochs = block_number / EPOCH_LENGTH; - for (uint32_t i = 0 ; i < epochs ; ++i) + for (uint32_t i = 0; i < epochs; ++i) SHA3_256(seedhash, seedhash, 32); }