diff --git a/clean_git_repo.sh b/scripts/clean_git_repo.sh similarity index 87% rename from clean_git_repo.sh rename to scripts/clean_git_repo.sh index b15508a..04338e9 100755 --- a/clean_git_repo.sh +++ b/scripts/clean_git_repo.sh @@ -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 } diff --git a/x/gridnode/keeper/gridnode_heartbeat.go b/x/gridnode/keeper/gridnode_heartbeat.go index 3ab2897..d494f9a 100644 --- a/x/gridnode/keeper/gridnode_heartbeat.go +++ b/x/gridnode/keeper/gridnode_heartbeat.go @@ -20,7 +20,7 @@ import ( ) const ( - interval = 1 * time.Minute + interval = 10 * time.Minute hashKey = "lastHashKey" ) diff --git a/x/gridnode/keeper/keeper.go b/x/gridnode/keeper/keeper.go index d5b2336..7cf1030 100644 --- a/x/gridnode/keeper/keeper.go +++ b/x/gridnode/keeper/keeper.go @@ -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)