From d1341d13bdc1a3ef8470e770e1c4426c7ef018e4 Mon Sep 17 00:00:00 2001 From: tomossomot Date: Mon, 2 Dec 2019 12:22:04 +0000 Subject: [PATCH 1/2] arithmetic expansion syntax --- scripts/create_request.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/create_request.sh b/scripts/create_request.sh index 5992f6d..8b12ca8 100755 --- a/scripts/create_request.sh +++ b/scripts/create_request.sh @@ -147,9 +147,9 @@ else fi fi -currentblockheight=`ocl getblockcount` # may have updated by now +currentblockheight=`ocl getblockcount` # may have updated by now # Request start height = confirmation time bufffer + current height + auction duration -let start=1+$currentblockheight+$4 +let start=$(( 1+$currentblockheight+$4 )) # Request end height = request start height + request duration let end=start+$5 From 2d2f952b1b8c4ac1ccd19064f1eb10ae6f0eeb07 Mon Sep 17 00:00:00 2001 From: tomossomot Date: Mon, 2 Dec 2019 13:03:52 +0000 Subject: [PATCH 2/2] fix --- scripts/create_request.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/create_request.sh b/scripts/create_request.sh index 8b12ca8..3e1a71c 100755 --- a/scripts/create_request.sh +++ b/scripts/create_request.sh @@ -149,9 +149,9 @@ fi currentblockheight=`ocl getblockcount` # may have updated by now # Request start height = confirmation time bufffer + current height + auction duration -let start=$(( 1+$currentblockheight+$4 )) +start=$(( 1+$currentblockheight+$4 )) # Request end height = request start height + request duration -let end=start+$5 +end=$(( start+$5 )) # Address permission tokens will be locked in pub=`ocl validateaddress $(ocl getnewaddress | jq -r '.') | jq -r ".pubkey"`