diff --git a/.gitignore b/.gitignore index 3b8da3a..5ca6960 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .pio -.vscode \ No newline at end of file +.vscode +NerdMinerLog.txt diff --git a/NerdMinerLog.txt b/NerdMinerLog.txt deleted file mode 100644 index 15b4e57..0000000 Binary files a/NerdMinerLog.txt and /dev/null differ diff --git a/bin/0x10000_firmware.bin b/bin/0x10000_firmware.bin index a268a1d..4ef1677 100644 Binary files a/bin/0x10000_firmware.bin and b/bin/0x10000_firmware.bin differ diff --git a/huge_app.csv b/huge_app.csv deleted file mode 100644 index 61254fc..0000000 --- a/huge_app.csv +++ /dev/null @@ -1,6 +0,0 @@ -# Name, Type, SubType, Offset, Size, Flags -nvs, data, nvs, 0x9000, 0x5000, -otadata, data, ota, 0xe000, 0x2000, -app0, app, ota_0, 0x10000, 0x300000, -spiffs, data, spiffs, 0x310000,0xE0000, -coredump, data, coredump,0x3F0000,0x10000, \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index ca555b8..bb5126d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -15,7 +15,9 @@ globallib_dir = lib platform = espressif32 board = esp32-s3-devkitc-1 framework = arduino -monitor_filters = esp32_exception_decoder +monitor_filters = + esp32_exception_decoder + time board_build.arduino.memory_type = qio_opi monitor_speed = 115200 upload_speed = 115200 @@ -29,8 +31,8 @@ board_build.partitions = huge_app.csv build_flags = -D LV_LVGL_H_INCLUDE_SIMPLE -D BOARD_HAS_PSRAM - -D ARDUINO_USB_MODE=1 - -D ARDUINO_USB_CDC_ON_BOOT=1 + ;-D ARDUINO_USB_MODE=1 + ;-D ARDUINO_USB_CDC_ON_BOOT=1 ;-D DEBUG_MINING=1 lib_deps = https://github.com/takkaO/OpenFontRender diff --git a/src/mining.cpp b/src/mining.cpp index 31bbb77..e409801 100644 --- a/src/mining.cpp +++ b/src/mining.cpp @@ -28,11 +28,10 @@ extern OpenFontRender render; extern TFT_eSprite background; bool checkHalfShare(unsigned char* hash) { - bool valid = true; + //bool valid = true; for(uint8_t i=31; i>31-2; i--) { if(hash[i] != 0) { - valid = false; - break; + return false; } } #ifdef DEBUG_MINING @@ -43,7 +42,7 @@ bool checkHalfShare(unsigned char* hash) { Serial.println(); } #endif - return valid; + return true; } bool checkShare(unsigned char* hash) { @@ -423,6 +422,7 @@ void runWorker(void *name) { // search a valid nonce uint32_t nonce = 0; uint32_t startT = micros(); + bytearray_blockheader[79] = 0; //We only mine until 1MHashes this will allways be zero Serial.println(">>> STARTING TO HASH NONCES"); while(true) { bytearray_blockheader[76] = (nonce >> 0) & 0xFF; @@ -558,4 +558,3 @@ void runMonitor(void *name){ vTaskDelay(5000 / portTICK_PERIOD_MS); } } -