PoW changes WIP

This commit is contained in:
XMRig 2018-03-06 21:34:20 +07:00
parent df6a397e52
commit 8b60585004
9 changed files with 121 additions and 91 deletions

View file

@ -32,9 +32,13 @@
#include "align.h"
#define AEON_MEMORY 1048576
#define AEON_MASK 0xFFFF0
#define AEON_ITER 0x40000
#define MEMORY 2097152 /* 2 MiB */
#define MEMORY_LITE 1048576 /* 1 MiB */
#define MONERO_MEMORY 2097152
#define MONERO_MASK 0x1FFFF0
#define MONERO_ITER 0x80000
struct cryptonight_ctx {
@ -53,7 +57,7 @@ class CryptoNight
public:
static bool hash(const Job &job, JobResult &result, cryptonight_ctx *ctx);
static bool init(int algo, int variant);
static bool hash(const uint8_t *input, size_t size, uint8_t *output, cryptonight_ctx *ctx, uint8_t version);
static void hash(const uint8_t *input, size_t size, uint8_t *output, cryptonight_ctx *ctx, uint8_t version);
private:
static bool selfTest(int algo);