Skip to content

Commit 83fdaab

Browse files
committed
ethash: Move ethash::result to C
1 parent 4f15624 commit 83fdaab

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

include/ethash/ethash.h

+7
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ struct ethash_epoch_context
4444
struct ethash_epoch_context_full;
4545

4646

47+
struct ethash_result
48+
{
49+
union ethash_hash256 final_hash;
50+
union ethash_hash256 mix_hash;
51+
};
52+
53+
4754
/**
4855
* Calculates the number of items in the light cache for given epoch.
4956
*

include/ethash/ethash.hpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ static constexpr int num_dataset_accesses = ETHASH_NUM_DATASET_ACCESSES;
3333
using epoch_context = ethash_epoch_context;
3434
using epoch_context_full = ethash_epoch_context_full;
3535

36+
using result = ethash_result;
37+
3638
/// Constructs a 256-bit hash from an array of bytes.
3739
///
3840
/// @param bytes A pointer to array of at least 32 bytes.
@@ -44,12 +46,6 @@ inline hash256 hash256_from_bytes(const uint8_t bytes[32]) noexcept
4446
return h;
4547
}
4648

47-
struct result
48-
{
49-
hash256 final_hash;
50-
hash256 mix_hash;
51-
};
52-
5349
struct search_result
5450
{
5551
bool solution_found = false;

0 commit comments

Comments
 (0)