Fabcoin Core
0.16.2
P2P Digital Currency
|
Go to the source code of this file.
Functions | |
enum ethash_io_rc | ethash_io_prepare (char const *dirname, ethash_h256_t const seedhash, FILE **output_file, uint64_t file_size, bool force_create) |
Prepares io for ethash. More... | |
Definition in file io.c.
enum ethash_io_rc ethash_io_prepare | ( | char const * | dirname, |
ethash_h256_t const | seedhash, | ||
FILE ** | output_file, | ||
uint64_t | file_size, | ||
bool | force_create | ||
) |
Prepares io for ethash.
Create the DAG directory and the DAG file if they don't exist.
[in] | dirname | A null terminated c-string of the path of the ethash data directory. If it does not exist it's created. |
[in] | seedhash | The seedhash of the current block number, used in the naming of the file as can be seen from the spec at: https://github.com/ethereum/wiki/wiki/Ethash-DAG |
[out] | output_file | If there was no failure then this will point to an open file descriptor. User is responsible for closing it. In the case of memo match then the file is open on read mode, while on the case of mismatch a new file is created on write mode |
[in] | file_size | The size that the DAG file should have on disk |
[out] | force_create | If true then there is no check to see if the file already exists |
Definition at line 26 of file io.c.