angepasst
Some checks are pending
Build CPU miner / build (push) Waiting to run

This commit is contained in:
w12
2025-01-07 17:36:18 +01:00
parent f180f5644a
commit c60bc736f5
2 changed files with 5 additions and 18 deletions

View File

@@ -8,13 +8,6 @@
#include <string.h>
#include <inttypes.h>
#ifdef TARGET_RASPBERRY
#define BLOCK_VERSION 0x10000000 // Raspberry Pi spezifische Version
#elif defined(TARGET_NOARM)
#define BLOCK_VERSION 0x20000000 // Non-ARM spezifische Version
#else
#define BLOCK_VERSION 0x00000000 // Standard Block-Version
#endif
/* Auswahl der Yespower-Parameter basierend auf der Zielplattform */
const yespower_params_t *select_yespower_params(void) {
@@ -51,9 +44,8 @@ const yespower_params_t *select_yespower_params(void) {
}
/* Scanhash-Funktion für Yespower */
int scanhash_arm_yespower(int thr_id, uint32_t *pdata, const uint32_t *ptarget, uint32_t max_nonce, unsigned long *hashes_done) {
const yespower_params_t *params = select_yespower_params();
int scanhash_arm_yespower(int thr_id, uint32_t *pdata, const uint32_t *ptarget, uint32_t max_nonce, unsigned long *hashes_done, int32_t nVersion) {
const yespower_params_t *params = select_yespower_params(); // Korrigierter Funktionsaufruf
union {
uint8_t u8[80];
uint32_t u32[20];

View File

@@ -1125,14 +1125,9 @@ static void stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
diff_to_target(work->target, sctx->job.diff / 65536.0);
}
int get_dynamic_block_version() {
#ifdef TARGET_RASPBERRY
return BLOCK_VERSION_RASPBERRY;
#elif defined(TARGET_NOARM)
return BLOCK_VERSION_NOARM;
#else
return BLOCK_VERSION_DEFAULT;
#endif
void some_function() {
int version = get_dynamic_block_version();
// Weiterer Code...
}
static void *miner_thread(void *userdata)