Skip to content

Commit

Permalink
set interval for heartbeat to 10 minutes and undelegate time for grid…
Browse files Browse the repository at this point in the history
…nodes to 1 day
  • Loading branch information
dekm committed Nov 21, 2023
1 parent eb24b5c commit 6c93446
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions clean_git_repo.sh → scripts/clean_git_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ delete_release() {
"https://api.github.com/repos/$GITHUB_REPO/releases/tags/$tag" |
jq -r '.id')

# If release exists, delete it
if [ "$release_id" != "null" ]; then
curl -s -X DELETE \
"https://api.github.com/repos/$GITHUB_REPO/releases/$release_id"
response=$(curl -s -X DELETE \
"https://api.github.com/repos/$GITHUB_REPO/releases/$release_id")
echo "Deleting release $release_id: $response"
else
echo "No release found for tag $tag"
fi
}

Expand Down
2 changes: 1 addition & 1 deletion x/gridnode/keeper/gridnode_heartbeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

const (
interval = 1 * time.Minute
interval = 10 * time.Minute
hashKey = "lastHashKey"
)

Expand Down
6 changes: 3 additions & 3 deletions x/gridnode/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ func (k Keeper) UndelegateTokens(ctx sdk.Context, account sdk.AccAddress, amount
// Retrieve current block time
blockTime := ctx.BlockTime()

// Define the unbonding period, 21 days
// Define the unbonding period, 21 days TODO: enable this for mainnet
//unbondingPeriod := time.Hour * 24 * 21
// Define the unbonding period, (for testing)
unbondingPeriod := time.Hour
// Define the unbonding period, (for testnet 1 day)
unbondingPeriod := time.Hour * 24 * 1
// Calculate the completion time for the unbonding
completionTime := blockTime.Add(unbondingPeriod)

Expand Down

0 comments on commit 6c93446

Please sign in to comment.