From d7b3e00407c23bd3cc39826f0912f8a268d6f016 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Wed, 22 Apr 2015 10:17:39 +0200 Subject: [PATCH] ethash_return_value get a _t for consistency --- ethash.h | 12 +++++------- internal.c | 10 +++++----- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/ethash.h b/ethash.h index 61bb72fdb..a0860097e 100644 --- a/ethash.h +++ b/ethash.h @@ -73,16 +73,14 @@ struct ethash_full; typedef struct ethash_full* ethash_full_t; typedef int(*ethash_callback_t)(unsigned); -// LTODO: for consistency's sake maybe use ethash_return_value_t? typedef struct ethash_return_value { ethash_h256_t result; ethash_h256_t mix_hash; -} ethash_return_value; +} ethash_return_value_t; uint64_t ethash_get_datasize(uint64_t const block_number); uint64_t ethash_get_cachesize(uint64_t const block_number); -// LTODO: for consistency's sake maybe use ethash_cache_t? typedef struct ethash_cache { void* mem; uint64_t cache_size; @@ -131,7 +129,7 @@ void ethash_light_delete(ethash_light_t light); * parameters given. */ bool ethash_light_compute( - ethash_return_value* ret, + ethash_return_value_t* ret, ethash_light_t light, uint64_t full_size, const ethash_h256_t* header_hash, @@ -195,7 +193,7 @@ void ethash_full_delete(ethash_full_t full); * at some point return a non-zero value */ bool ethash_full_compute( - ethash_return_value* ret, + ethash_return_value_t* ret, ethash_full_t full, ethash_h256_t const* header_hash, uint64_t const nonce @@ -265,14 +263,14 @@ static inline void ethash_params_init(ethash_params* params, uint32_t const bloc void ethash_mkcache(ethash_cache_t* cache, ethash_params const* params, ethash_h256_t const* seed); void ethash_full( - ethash_return_value* ret, + ethash_return_value_t* ret, void const* full_mem, ethash_params const* params, ethash_h256_t const* header_hash, uint64_t const nonce ); void ethash_light( - ethash_return_value* ret, + ethash_return_value_t* ret, ethash_cache_t const* cache, ethash_params const* params, ethash_h256_t const* header_hash, diff --git a/internal.c b/internal.c index 9a75a12fd..512a0ed9d 100644 --- a/internal.c +++ b/internal.c @@ -189,7 +189,7 @@ bool ethash_compute_full_data(void* mem, uint64_t full_size, ethash_cache_t cons } static bool ethash_hash( - ethash_return_value* ret, + ethash_return_value_t* ret, node const* full_nodes, ethash_cache_t const* cache, uint64_t full_size, @@ -343,7 +343,7 @@ void ethash_light_delete(ethash_light_t light) } bool ethash_light_compute( - ethash_return_value* ret, + ethash_return_value_t* ret, ethash_light_t light, uint64_t full_size, const ethash_h256_t* header_hash, @@ -445,7 +445,7 @@ void ethash_full_delete(ethash_full_t full) } bool ethash_full_compute( - ethash_return_value* ret, + ethash_return_value_t* ret, ethash_full_t full, ethash_h256_t const* header_hash, uint64_t const nonce @@ -486,7 +486,7 @@ void ethash_mkcache( } void ethash_full( - ethash_return_value* ret, + ethash_return_value_t* ret, void const* full_mem, ethash_params const* params, ethash_h256_t const* header_hash, @@ -496,7 +496,7 @@ void ethash_full( ethash_hash(ret, (node const *) full_mem, NULL, params->full_size, header_hash, nonce, NULL); } void ethash_light( - ethash_return_value* ret, + ethash_return_value_t* ret, ethash_cache_t const* cache, ethash_params const* params, ethash_h256_t const* header_hash,