Skip to content

Commit

Permalink
(Sentinel) Higher Delegator balance alarm threshold for mainnet (#1862)
Browse files Browse the repository at this point in the history
* feat: higher alarm threshold for mainnet

* fix: fix failing test
  • Loading branch information
nick-bisonai authored Jul 19, 2024
1 parent ea28283 commit 75700a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions sentinel/pkg/checker/balance/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ func Start(ctx context.Context) error {
func loadEnvs() {
SubmitterAlarmAmount = 25
DelegatorAlarmAmount = 10000
if os.Getenv("CHAIN") == "cypress" {
DelegatorAlarmAmount = 50000
}
BalanceCheckInterval = 60 * time.Second
BalanceAlarmInterval = 30 * time.Minute

Expand Down
3 changes: 2 additions & 1 deletion sentinel/pkg/checker/balance/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"net/http"
"net/http/httptest"
"os"
"testing"

"github.com/klaytn/klaytn/common"
Expand Down Expand Up @@ -84,7 +85,7 @@ func TestLoadWalletFromDelegator(t *testing.T) {

func TestGetBalance(t *testing.T) {
ctx := context.Background()
err := setClient("https://klaytn-baobab.g.allthatnode.com/full/evm")
err := setClient(os.Getenv("JSON_RPC_URL"))
if err != nil {
t.Fatalf("Expected no error, got %v", err)
}
Expand Down

0 comments on commit 75700a8

Please sign in to comment.