Skip to content

Commit

Permalink
chore: better diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Mar 18, 2024
1 parent 8185903 commit 5fbd352
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,19 @@ export SUBMIT_PROPOSAL_OPTS="--keyring-backend=test --chain-id=$CHAINID \
--yes --broadcast-mode block --from validator"

voteLatestProposalAndWait() {
echo "start voteLatestProposalAndWait()"
waitForBlock
proposal=$($binary q gov proposals -o json | jq -r '.proposals | last | if .proposal_id == null then .id else .proposal_id end')
echo "Latest proposal: $proposal"
waitForBlock
$binary tx -bblock gov deposit $proposal 50000000ubld --from=validator --chain-id="$CHAINID" --yes --keyring-backend test
$binary tx -bblock gov deposit "$proposal" 50000000ubld --from=validator --chain-id="$CHAINID" --yes --keyring-backend test
waitForBlock
$binary tx -bblock gov vote $proposal yes --from=validator --chain-id="$CHAINID" --yes --keyring-backend test
$binary tx -bblock gov vote "$proposal" yes --from=validator --chain-id="$CHAINID" --yes --keyring-backend test
waitForBlock

echo "Voted in proposal $proposal"
while true; do
json=$($binary q gov proposal $proposal -ojson)
json=$($binary q gov proposal "$proposal" -ojson)
status=$(echo "$json" | jq -r .status)
case $status in
PROPOSAL_STATUS_PASSED)
Expand Down

0 comments on commit 5fbd352

Please sign in to comment.