-
Notifications
You must be signed in to change notification settings - Fork 520
Conversation
78a9796
to
a08150c
Compare
these should become:
Before, it was up to the caller to allocate the memory required, passing it in as a
May be worth splitting it up into two PRs - integrating memory management separately. |
I typedefed |
new API spec:
|
char info_buffer[DAG_MEMO_BYTESIZE]; | ||
ethash_blockhash_t seedhash; | ||
|
||
p.cache_size = ethash_get_cachesize(block_number); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spaces or tabs, not both :)
newer API spec:
non-zero return from an object of type Example usage:
|
418b533
to
368a397
Compare
@@ -1,5 +1,7 @@ | |||
IF( NOT Boost_FOUND ) | |||
find_package(Boost COMPONENTS unit_test_framework) | |||
find_package(Boost COMPONENTS system) | |||
find_package(Boost COMPONENTS filesystem) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better way:
find_package(Boost 1.54.0 REQUIRED COMPONENTS unit_test_framework system filesystem)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be BOOST 1.48.0 since this is only for testing and C++11 and is not the same as the rest of the codebase. Basically boost 1.48.0 is the max we can get in travis-CI so this is kind of a limitation :(
368a397
to
6553067
Compare
rebased |
- DAG and memo file creation will now be taken care of in libethash itself. - To that end we crete a very minimal IO module for ethash. - Depending on the target system io_posix or io_win32 will be used. - Implemented ethash_io_prepare() for posix
- adding ethash_io_write() function - only ethash_io_prepare() invoke system dependent functions so it's the only one going in system specific source files.
- Also typedefing a blockhash (uint8_t[32]) as an ethash_blockhash_t
- adding back the tests for ethash_io - adding back the travis configuration changes - minor changes to make everything work
ethash_io_prepare()
first to make sure the directory exists and check if the memo file's contents match with the current block hash.ethash_io_write()
which would compute the full data just likeethash_prep_full()
would, write it to the disk along with the memo file and also return them.Have not yet tried to use it from the C++ client but need to first see if the PR will build in Windows.