代码拉取完成,页面将自动刷新
#!/bin/bash
# USAGE examples:
# CLI with env vars: PROVER_PRIVATE_KEY=APrivateKey1... ./run-prover.sh
# CLI with prompts for vars: ./run-prover.sh
# If the env var PROVER_PRIVATE_KEY is not set, prompt for it
if [ -z "${PROVER_PRIVATE_KEY}" ]
then
read -r -p "Enter the Aleo Prover account private key: "
PROVER_PRIVATE_KEY=$REPLY
fi
if [ "${PROVER_PRIVATE_KEY}" == "" ]
then
PROVER_PRIVATE_KEY="APrivateKey1zkp8cC4jgHEBnbtu3xxs1Ndja2EMizcvTRDq5Nikdkukg1p"
fi
COMMAND="cargo run --release -- start --nodisplay --prover ${PROVER_PRIVATE_KEY}"
for word in $*;
do
COMMAND="${COMMAND} ${word}"
done
function exit_node()
{
echo "Exiting..."
kill $!
exit
}
trap exit_node SIGINT
echo "Running an Aleo Prover node..."
$COMMAND &
while :
do
echo "Checking for updates..."
git stash
rm Cargo.lock
STATUS=$(git pull)
if [ "$STATUS" != "Already up to date." ]; then
echo "Updated code found, rebuilding and relaunching prover"
cargo clean
kill -INT $!; sleep 2; $COMMAND &
fi
sleep 1800;
done
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。