Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Testnet Injector
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EcoMobiCoin
Testnet Injector
Commits
4bd624aa
Commit
4bd624aa
authored
1 year ago
by
Anthony GRAIGNIC
Browse files
Options
Downloads
Patches
Plain Diff
Add healthcheck before starting simulation script
parent
d4b1fb8d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#6646
passed
1 year ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/run_simulation_2_nodes.sh
+20
-2
20 additions, 2 deletions
scripts/run_simulation_2_nodes.sh
with
20 additions
and
2 deletions
scripts/run_simulation_2_nodes.sh
+
20
−
2
View file @
4bd624aa
...
...
@@ -7,9 +7,27 @@ export MNEMONIC='before exclude interest push zone jealous boat ice chimney juic
export
RPC_URL
=
http://127.0.0.1:8545
;
export
CHAIN_ID
=
636363
;
# Check if RPC node is available before starting the simulation
MAX_ATTEMPTS
=
5
DELAY_BETWEEN_ATTEMPS
=
3
attempt
=
1
while
true
;
do
# test=$(curl --fail --max-time 3 --header 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83 }' --location $RPC_URL | grep '"result":"0x0"')
response
=
$(
curl
-s
-o
/dev/null
--header
'Content-Type: application/json'
--data
'{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83 }'
-w
"%{http_code}"
$RPC_URL
)
if
[
"
$response
"
==
"200"
]
;
then
break
fi
echo
"RPC node not ready, let's wait
$DELAY_BETWEEN_ATTEMPS
seconds"
sleep
"
$DELAY_BETWEEN_ATTEMPS
"
attempt
=
$((
attempt
+
1
))
if
[
"
$attempt
"
-gt
"
$MAX_ATTEMPTS
"
]
;
then
exit
1
fi
done
# ./target/release/testnet-injector simulate-bx-from-csv ../movement-data/public-transport/MF_user_mobility_june-to-august-2023_mulhouse_dataset/anonymized_june-to-august-2023_mulhouse_dataset.csv $TOTAL_SIMULATION_TIME &
# Send BX
./target/release/testnet-injector simulate-bx-from-csv ./data/anonymized_june-to-november-2023_france_dataset.csv
$TOTAL_SIMULATION_TIME
&
echo
"TOTAL_SIMULATION_TIME =
$TOTAL_SIMULATION_TIME
and block time =
$BLOCK_TIME
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment