Increase watchdog timeout to 15 minutes
Also increase nonce range to 25M to keep miner busy for up to 10 minutes.
This commit is contained in:
parent
e2c6c85767
commit
3314237927
@ -20,8 +20,8 @@
|
||||
|
||||
//3 seconds WDT
|
||||
#define WDT_TIMEOUT 3
|
||||
//120 seconds WDT for miner task
|
||||
#define WDT_MINER_TIMEOUT 120
|
||||
//15 minutes WDT for miner task
|
||||
#define WDT_MINER_TIMEOUT 900
|
||||
OneButton button1(PIN_BUTTON_1);
|
||||
OneButton button2(PIN_BUTTON_2);
|
||||
|
||||
|
@ -375,9 +375,9 @@ void runMiner(void * task_id) {
|
||||
mMiner.inRun = false;
|
||||
Serial.print(">>> Finished job waiting new data from pool");
|
||||
|
||||
if(hashes>=MAX_NONCE) {
|
||||
Mhashes=Mhashes+MAX_NONCE/1000000;
|
||||
hashes=hashes-MAX_NONCE;
|
||||
if(hashes>=MAX_NONCE_STEP) {
|
||||
Mhashes=Mhashes+MAX_NONCE_STEP/1000000;
|
||||
hashes=hashes-MAX_NONCE_STEP;
|
||||
}
|
||||
|
||||
uint32_t duration = micros() - startT;
|
||||
|
@ -3,7 +3,8 @@
|
||||
#define MINING_API_H
|
||||
|
||||
// Mining
|
||||
#define MAX_NONCE 5000000U
|
||||
#define MAX_NONCE_STEP 5000000U
|
||||
#define MAX_NONCE 25000000U
|
||||
#define TARGET_NONCE 471136297U
|
||||
#define DEFAULT_DIFFICULTY 1e-4
|
||||
#define KEEPALIVE_TIME_ms 30000
|
||||
|
Loading…
Reference in New Issue
Block a user