27 #define __STDC_FORMAT_MACROS 1 42 #define DAG_MUTABLE_NAME_MAX_SIZE (6 + 10 + 1 + 16 + 1) 53 #if defined(_WIN32) && !defined(__GNUC__) 54 #define snprintf(...) sprintf_s(__VA_ARGS__) 62 #ifdef ETHASH_PRINT_CRITICAL_OUTPUT 63 #define ETHASH_CRITICAL(...) \ 66 printf("ETHASH CRITICAL ERROR: "__VA_ARGS__); \ 71 #define ETHASH_CRITICAL(...) 171 char const* filename,
172 size_t filename_length
187 static inline bool ethash_io_mutable_name(
193 uint64_t hash = *((uint64_t*)seed_hash);
194 #if LITTLE_ENDIAN == BYTE_ORDER ethash_io_rc
Possible return values of.
#define ethash_swap_u64(input_)
DAG with revision/hash match, but file size was wrong.
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.
char * ethash_strncat(char *dest, size_t dest_size, char const *src, size_t count)
An strncat wrapper for no-warnings crossplatform strncat.
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.
int ethash_fileno(FILE *f)
Get a file descriptor number from a FILE stream.
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.
Type of a seedhash/blockhash e.t.c.
The DAG file did not exist or there was revision/hash mismatch.
#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.
bool ethash_get_default_dirname(char *strbuf, size_t buffsize)
Gets the default directory name for the DAG depending on the system.
There has been an IO failure.