-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
node check and remove duplicate gentxs (#614)
* remove duplicates * add validator check * typo
- Loading branch information
1 parent
1e394ac
commit 2909e66
Showing
5 changed files
with
17 additions
and
5 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
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,15 @@ | ||
#!/bin/bash | ||
CHAIN_ID=cygnusx-1 | ||
for i in $CHAIN_ID/gentx/*.json; do | ||
pubkeybase64=$(jq -r '.body.messages[0].pubkey.key' $i) | ||
pubkey=$(starsd debug pubkey $pubkeybase64 | grep Consensus | rev | cut -d " " -f1 | rev) | ||
local_pub_key=$(starsd tendermint show-validator) | ||
echo "Checking file $i" | ||
if [ "$pubkey" == "$local_pub_key" ]; then | ||
echo "This is a validator node" | ||
echo "Your gentx is $i" | ||
exit 0; | ||
fi | ||
done | ||
echo "This is not a validator node" | ||
exit 1; |
1 change: 0 additions & 1 deletion
1
cygnusx-1/gentx/gentx-1ff88514bfc749cfc5607e62e41d2b5c2541c59c.json
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
cygnusx-1/gentx/gentx-3599c2cc8154b7777e7750cc5ca30793feb66a19.json
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
cygnusx-1/gentx/gentx-8a026687751b0afb423d88865c47cce4238b4724.json
This file was deleted.
Oops, something went wrong.