2019-05-12 20:38:37 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
var keyInterval = 3 * time.Minute
|
|
|
|
|
|
|
|
type keyChecker struct {
|
2020-02-27 19:38:22 +00:00
|
|
|
db *db
|
2019-05-12 20:38:37 +00:00
|
|
|
}
|
|
|
|
|
2020-10-12 08:11:05 +00:00
|
|
|
func newkeyChecker(db *db, _ string) *keyChecker {
|
2020-02-26 21:15:36 +00:00
|
|
|
log.Warn("Key checker temporarily disabled during refactor.")
|
2019-05-12 20:38:37 +00:00
|
|
|
|
|
|
|
return &keyChecker{
|
2020-02-27 19:38:22 +00:00
|
|
|
db: db,
|
2019-05-12 20:38:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (k *keyChecker) checkKeys() error {
|
2020-02-26 21:15:36 +00:00
|
|
|
log.Warn("Not checking for EXITED validator keys.")
|
2019-05-12 20:38:37 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (k *keyChecker) run() {
|
|
|
|
for {
|
|
|
|
if err := k.checkKeys(); err != nil {
|
|
|
|
log.WithError(err).Error("Failed to check keys")
|
|
|
|
}
|
|
|
|
time.Sleep(keyInterval)
|
|
|
|
}
|
|
|
|
}
|