96 ETHASH_CRITICAL(
"Could not seek to the end of DAG file: \"%s\". Insufficient space?", tmpfile);
99 if (fputc(
'\n', f) == EOF) {
101 ETHASH_CRITICAL(
"Could not write in the end of DAG file: \"%s\". Insufficient space?", tmpfile);
104 if (fflush(f) != 0) {
106 ETHASH_CRITICAL(
"Could not flush at end of DAG file: \"%s\". Insufficient space?", tmpfile);
ethash_io_rc
Possible return values of.
DAG with revision/hash match, but file size was wrong.
#define ETHASH_CRITICAL(...)
Logs a critical error in important parts of ethash.
char * ethash_io_create_filename(char const *dirname, char const *filename, size_t filename_length)
Create the filename for the DAG.
bool ethash_file_size(FILE *f, size_t *ret_size)
Get a file's size.
FILE * ethash_fopen(char const *file_name, char const *mode)
An fopen wrapper for no-warnings crossplatform fopen.
DAG file existed and revision/hash matched. No need to do anything.
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.
#define ETHASH_DAG_MAGIC_NUM_SIZE
Type of a seedhash/blockhash e.t.c.
The DAG file did not exist or there was revision/hash mismatch.
#define ETHASH_DAG_MAGIC_NUM
#define DAG_MUTABLE_NAME_MAX_SIZE
bool ethash_mkdir(char const *dirname)
A cross-platform mkdir wrapper to create a directory or assert it's there.
There has been an IO failure.