From 28f8a53e33fecb146a27d982a46fc90704f3de21 Mon Sep 17 00:00:00 2001 From: keroro Date: Tue, 19 Apr 2022 11:04:54 +0800 Subject: [PATCH] chore: avoid retrying deposit even when fails --- kicker | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/kicker b/kicker index bcb56308..3e05e679 100755 --- a/kicker +++ b/kicker @@ -210,25 +210,20 @@ function deposit() { fi abspkpath="$( cd -- "$(dirname "$pkpath")" >/dev/null 2>&1 ; pwd -P )/$(basename $pkpath)" - # FIXME: Deposit CKB error: invalid type: null, expected struct TransactionView - # => fix wait_for_tx function in gw-tools - while true; do - docker-compose -f docker/docker-compose.yml run \ - --no-deps \ - --use-aliases \ - --volume=$WORKSPACE/docker/layer2/config:/config \ - --volume=$abspkpath:/privkey-path \ - --entrypoint "gw-tools deposit-ckb \ - --godwoken-rpc-url http://godwoken:8119 \ - --ckb-rpc http://ckb:8114 \ - --scripts-deployment-path /config/scripts-deployment.json \ - --config-path /config/godwoken-config.toml \ - --privkey-path /privkey-path \ - --eth-address $ethaddr \ - --capacity $amount" \ - godwoken && echo "Deposit finished" && break - sleep 6 && echo "Retry" - done + docker-compose -f docker/docker-compose.yml run \ + --no-deps \ + --use-aliases \ + --volume=$WORKSPACE/docker/layer2/config:/config \ + --volume=$abspkpath:/privkey-path \ + --entrypoint "gw-tools deposit-ckb \ + --godwoken-rpc-url http://godwoken:8119 \ + --ckb-rpc http://ckb:8114 \ + --scripts-deployment-path /config/scripts-deployment.json \ + --config-path /config/godwoken-config.toml \ + --privkey-path /privkey-path \ + --eth-address $ethaddr \ + --capacity $amount" \ + godwoken && echo "Deposit finished" } # Note that this function MUST be in tty mode.