This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
int get_dynamic_block_version() {
|
||||||
#ifdef TARGET_RASPBERRY
|
#ifdef TARGET_RASPBERRY
|
||||||
#define BLOCK_VERSION BLOCK_VERSION_RASPBERRY
|
#define BLOCK_VERSION BLOCK_VERSION_RASPBERRY
|
||||||
#elif defined(TARGET_NOARM)
|
#elif defined(TARGET_NOARM)
|
||||||
@@ -15,9 +16,12 @@
|
|||||||
#else
|
#else
|
||||||
#define BLOCK_VERSION BLOCK_VERSION_DEFAULT
|
#define BLOCK_VERSION BLOCK_VERSION_DEFAULT
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/* Auswahl der Yespower-Parameter basierend auf nVersion */
|
/* Auswahl der Yespower-Parameter basierend auf nVersion */
|
||||||
const yespower_params_t *select_yespower_params_by_version(int32_t nVersion) {
|
const yespower_params_t *select_yespower_params(void) {
|
||||||
|
int block_version = get_dynamic_block_version();
|
||||||
|
|
||||||
if ((nVersion & BLOCK_VERSION_RASPBERRY) == BLOCK_VERSION_RASPBERRY) {
|
if ((nVersion & BLOCK_VERSION_RASPBERRY) == BLOCK_VERSION_RASPBERRY) {
|
||||||
static const yespower_params_t params_raspberry = {
|
static const yespower_params_t params_raspberry = {
|
||||||
.version = YESPOWER_1_0,
|
.version = YESPOWER_1_0,
|
||||||
@@ -41,8 +45,8 @@ const yespower_params_t *select_yespower_params_by_version(int32_t nVersion) {
|
|||||||
.version = YESPOWER_1_0,
|
.version = YESPOWER_1_0,
|
||||||
.N = 4096,
|
.N = 4096,
|
||||||
.r = 16,
|
.r = 16,
|
||||||
.pers = (const uint8_t *)"Default",
|
.pers = (const uint8_t *)"Fallback",
|
||||||
.perslen = 7
|
.perslen = 8
|
||||||
};
|
};
|
||||||
return ¶ms_default;
|
return ¶ms_default;
|
||||||
}
|
}
|
||||||
@@ -114,4 +118,4 @@ int scanhash_arm_yespower(int thr_id, uint32_t *pdata, const uint32_t *ptarget,
|
|||||||
*hashes_done = n - pdata[19] + 1;
|
*hashes_done = n - pdata[19] + 1;
|
||||||
pdata[19] = n;
|
pdata[19] = n;
|
||||||
return 0; // Kein gültiger Block gefunden
|
return 0; // Kein gültiger Block gefunden
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,15 @@
|
|||||||
#define BLOCK_VERSION_NOARM 0x20000000
|
#define BLOCK_VERSION_NOARM 0x20000000
|
||||||
#define BLOCK_VERSION_DEFAULT 0x00000000
|
#define BLOCK_VERSION_DEFAULT 0x00000000
|
||||||
|
|
||||||
|
// Dynamische Bestimmung der Blockversion
|
||||||
|
#ifdef TARGET_RASPBERRY
|
||||||
|
#define BLOCK_VERSION BLOCK_VERSION_RASPBERRY
|
||||||
|
#elif defined(TARGET_NOARM)
|
||||||
|
#define BLOCK_VERSION BLOCK_VERSION_NOARM
|
||||||
|
#else
|
||||||
|
#define BLOCK_VERSION BLOCK_VERSION_DEFAULT
|
||||||
|
#endif
|
||||||
|
|
||||||
int get_dynamic_block_version();
|
int get_dynamic_block_version();
|
||||||
|
|
||||||
#endif // VERSION_H
|
#endif // VERSION_H
|
||||||
|
|||||||
Reference in New Issue
Block a user