Skip to content

Commit

Permalink
demo/run-validator.sh: restart is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
rus-alex committed Aug 1, 2023
1 parent 0992a66 commit ab47769
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions demo/run-validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi
mkdir -p "${DATADIR}"

echo -e "\nStart additional node $i:\n"
(run_opera_node $i)&
run_opera_node $i &
echo -e "\tnode$i ok"

echo -e "\nConnect to existing nodes:\n"
Expand All @@ -37,13 +37,8 @@ attach_and_exec 0 "ftm.sendTransaction({from: personal.listAccounts[0], to: \"${
sleep 5

echo -e "\nCall SFC to create validator ${VPKEY}:\n"
../build/demo_opera attach ./opera$i.datadir/opera.ipc << JS
../build/demo_opera attach "${DATADIR}/opera.ipc" << JS
abi = JSON.parse('[{"constant":false,"inputs":[{"internalType":"bytes","name":"pubkey","type":"bytes"}],"name":"createValidator","outputs":[],"payable":true,"stateMutability":"payable","type":"function"}]');
sfcc = web3.ftm.contract(abi).at("0xfc00face00000000000000000000000000000000");
sfcc.createValidator("${VPKEY}", {from:"${VADDR}", value: web3.toWei("500000.0", "ftm")});
JS

echo -e "\nRestart the node:\n"
kill %1
sleep 10
(run_opera_node $i)&
2 changes: 1 addition & 1 deletion demo/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rm -f ./transactions.rlp

for ((i=0;i<${TOTAL};i+=1))
do
(run_opera_node $i)&
run_opera_node $i &
echo -e "\tnode$i ok"
done

Expand Down

0 comments on commit ab47769

Please sign in to comment.