Implement a consistent retry mechanism on all factomd API calls in engine.
Exponential backoff with some sane limits should be used. This package is recommended: https://github.com/cenkalti/backoff
Retries should only occur if we get back a 500 server error. At least one successful attempt to hit the factomd API should be required. So don't retry during initial setup in the engine.Start function.
Errors should be logged and the next retry time should be printed.
The -factomscanretries flag should be renamed but we should still have a similar flag.
A context should be used so that stop signals are responded to.
Implement a consistent retry mechanism on all factomd API calls in
engine.Exponential backoff with some sane limits should be used. This package is recommended: https://github.com/cenkalti/backoff
Retries should only occur if we get back a 500 server error. At least one successful attempt to hit the factomd API should be required. So don't retry during initial setup in the engine.Start function.
Errors should be logged and the next retry time should be printed.
The -factomscanretries flag should be renamed but we should still have a similar flag.
A context should be used so that stop signals are responded to.