-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrate core-team nodes * Renaming identities * Update rpc provider * Adding suggestions * Commenting redeeming
- Loading branch information
1 parent
c83664f
commit c8aa8cf
Showing
13 changed files
with
124 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$1" ]; then | ||
echo "Error: Node number identifier is required." | ||
exit 1 | ||
fi | ||
|
||
#set -x | ||
HOPRD_API_URL=https://hoprd-core-rotsee-${1}.core-team.staging.hoprnet.link/api/v3 | ||
|
||
channels=$(curl -s -X 'GET' "${HOPRD_API_URL}/channels" -H 'accept: application/json' -H "X-Auth-Token: ${HOPRD_API_TOKEN}" | jq -r '.incoming[] | select(.status=="Open").id') | ||
for channel_id in "${channels[@]}"; do | ||
echo "Agregating tickets for channel id ${channel_id}" | ||
response=$(curl --max-time 300 --connect-timeout 300 -X 'POST' "${HOPRD_API_URL}/channels/${channel_id}/tickets/aggregate" -H 'accept: */*' -H "X-Auth-Token: ${HOPRD_API_TOKEN}" -d '') | ||
if [ $? -ne 0 ]; then | ||
echo "Error: Failed to aggregate tickets for channel ${channel_id}" | ||
continue | ||
fi | ||
sleep 2 | ||
|
||
#echo "Redeeming tickets for channel ${channel_id}" | ||
#curl -X 'POST' "${HOPRD_API_URL}/channels/${channel_id}/tickets/redeem" -H 'accept: */*' -H "X-Auth-Token: ${HOPRD_API_TOKEN}" -d '' | ||
#sleep 5 | ||
|
||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.