Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion on 'EInsufficientDifficulty' error #12

Open
jodiekurnia opened this issue May 14, 2024 · 2 comments
Open

Suggestion on 'EInsufficientDifficulty' error #12

jodiekurnia opened this issue May 14, 2024 · 2 comments

Comments

@jodiekurnia
Copy link

There is a lot of error EInsufficientDifficulty, can be fixed by doing Ctrl+C and re-run the program,
I suggest mineral-app don't use loop inside it's program, so we can do our-own looping method. atleast by this EInsufficientDifficulty error didn't eating our $SUI gass fee for obvious failed tx.

@flyingdisc
Copy link

This error (epoch_reset) should be caught by the program then quit instead of looping.
This error loops for several hours and consume my 0.3 $SUI totally for gas fee @0.0009 each.
So I decided to stop running this mining app.
mineral error Screenshot - 5_15_2024 , 10_47_36

@Elfet
Copy link

Elfet commented May 15, 2024

A pull request for the fix has already been created, but as a workaround until it is merged, the following shell script can be used.
#10

#!/bin/bash

command="./mineral-linux mine"

while true; do
  $command 2>&1 |
  while IFS= read -r line; do
    echo "$line"
    if echo "$line" | grep -q "EInsufficientDifficulty"; then
      echo "Specific string found in the output. Terminating and re-executing the command."

      child_pid=$(pgrep -f "$command")

      kill "$child_pid"

      break
    fi
  done

  sleep 1
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants