File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 99 description : Blocktank base URL
1010 required : true
1111 default : ' https://api.stag0.blocktank.to/blocktank/api/v2'
12+ mempool_server :
13+ description : Mempool API base URL
14+ required : true
15+ default : ' https://mempool.bitkit.stag0.blocktank.to'
1216 block_count :
1317 description : Number of regtest blocks to mine
1418 required : true
2024 env :
2125 BLOCK_COUNT : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.block_count || '1' }}
2226 BLOCKTANK_SERVER : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.blocktank_server || 'https://api.stag0.blocktank.to/blocktank/api/v2' }}
23- MEMPOOL_API : https://mempool.bitkit.stag0.blocktank.to/api/blocks/tip/height
27+ MEMPOOL_SERVER : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.mempool_server || ' https://mempool.bitkit.stag0.blocktank.to' }}
2428 steps :
2529 - name : Validate params
2630 run : |
4044 echo "BLOCKTANK_SERVER is empty" >&2
4145 exit 1
4246 fi
47+ if [[ -z "${MEMPOOL_SERVER}" ]]; then
48+ echo "MEMPOOL_SERVER is empty" >&2
49+ exit 1
50+ fi
4351 - name : Capture initial tip height
4452 run : |
53+ MEMPOOL_API="${MEMPOOL_SERVER%/}/api/blocks/tip/height"
4554 TIP_BEFORE=$(curl -sS "${MEMPOOL_API}" | tr -dc '0-9')
4655 if [[ -z "${TIP_BEFORE}" ]]; then
4756 echo "Failed to obtain initial block height" >&2
5968 -d "{\"count\": ${BLOCK_COUNT}}"
6069 - name : Verify new tip height
6170 run : |
71+ MEMPOOL_API="${MEMPOOL_SERVER%/}/api/blocks/tip/height"
6272 EXPECTED=$((TIP_BEFORE + BLOCK_COUNT))
6373 echo "Waiting up to 10 seconds for tip height to reach ${EXPECTED}..."
6474 END=$((SECONDS + 10))
You can’t perform that action at this time.
0 commit comments