This configurability is unlocked through the `testground`
build tag, which Project Oni will uses.
Changes in the usage places of these relaxed constants
were required due to the fact that Golang constants are
untyped, but vars aren't.
Read https://blog.golang.org/constants for more info.
add retry logic when calls to API fail.
if API reconnects fail, restart lotus-daemon as it means lotus-daemon is likely unhealthy.
wait for lotus node's chain to sync during each check cycle, to avoid restarting lotus-daemon if needing to sync.
handle SIGTERM properly.
general cleanup and refactor of code, getting ready of unnecessary channels
the test scenario 'healthyHeadCheckWindow5' was causing index out of bounds errors.
the second range function in checkWindow was iterating over the incorrect slice of cids.
should be comparing latest items in slices first
watch if chain head changes in a given window of api polls
allows setting a threshold of how many times the chain head can remain
unchanged before failing health check
also can set interval for polling chain head
on failure, restarts systemd unit