From 32202926330fb96c1395e7fa1898984f1810a738 Mon Sep 17 00:00:00 2001 From: bizk Date: Mon, 15 Jan 2024 19:14:46 -0300 Subject: [PATCH] merge with main --- Makefile | 3 +-- scripts/simapp-start-node.sh | 8 ++++---- tests/rosetta-cli/data.sh | 29 ----------------------------- 3 files changed, 5 insertions(+), 35 deletions(-) delete mode 100644 tests/rosetta-cli/data.sh diff --git a/Makefile b/Makefile index 62f6a13..9b9a8cb 100644 --- a/Makefile +++ b/Makefile @@ -16,11 +16,10 @@ test: test-rosetta-ci: sh ./scripts/simapp-start-node.sh - sleep 120 make build && make plugin ./rosetta --blockchain "cosmos" --network "cosmos" --tendermint "tcp://localhost:26657" --addr "localhost:8080" --grpc "localhost:9090" & sleep 30 - sh ./tests/rosetta-cli/rosetta-cli-test.sh + export SIMD_BIN=./cosmos-sdk/build/simd && sh ./tests/rosetta-cli/rosetta-cli-test.sh ############################################################################### ### Linting ### diff --git a/scripts/simapp-start-node.sh b/scripts/simapp-start-node.sh index cd809d2..aac6e4a 100644 --- a/scripts/simapp-start-node.sh +++ b/scripts/simapp-start-node.sh @@ -3,10 +3,10 @@ git clone https://github.com/cosmos/cosmos-sdk.git cd cosmos-sdk make build export SIMD_BIN=./build/simd -make init-simapp --dry-run -echo "simapp started" +chmod 777 ./scripts/init-simapp.sh +sh ./scripts/init-simapp.sh --just-print $SIMD_BIN start & -echo "start" -until curl --silent --head --fail http://localhost:26657/health; do +until curl --output /dev/null --silent --head --fail http://localhost:26657/health; do +>>>>>>> 7db5729 (Ci fixed (?)) sleep 1 done \ No newline at end of file diff --git a/tests/rosetta-cli/data.sh b/tests/rosetta-cli/data.sh deleted file mode 100644 index 8328f6b..0000000 --- a/tests/rosetta-cli/data.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -SIMD_BIN=${SIMD_BIN:=$(which simd 2>/dev/null)} - -if [ -z "$SIMD_BIN" ]; then echo "SIMD_BIN is not set. Make sure to run make install before"; exit 1; fi - -# Global variables -KEY_RING_BACKEND="test" -CHAIN_ID="demo" -amount_of_wallets=100 - -validator_address=$($SIMD_BIN keys show alice -a --keyring-backend "$KEY_RING_BACKEND") - -echo "[INFO] Generating wallets: $amount_of_wallets" -for ((index=0; index<"$amount_of_wallets"; index++)) -do - random_number=$((1 + RANDOM % 10000)) - - wallet_name="wallet-$random_number" - $SIMD_BIN keys add $wallet_name --keyring-backend "$KEY_RING_BACKEND" - wallet_address=$($SIMD_BIN keys show $wallet_name -a --keyring-backend "$KEY_RING_BACKEND") - echo "[DEBUG] Generated wallet: $wallet_name - $wallet_address" - - amount="$((RANDOM*10))stake" - echo "[DEBUG] Generating tx from validator: $validator_address sending $amount to $wallet_address" - $SIMD_BIN tx bank send "$validator_address" "$wallet_address" "$amount" --chain-id "$CHAIN_ID" --keyring-backend "$KEY_RING_BACKEND" -y - - sleep 1s # Wait so the TXs can happen in different blocks -done