daemon: clean up test dirs.

Move final helpers out of test-cli/

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-05-02 16:02:56 +09:30
parent 064309df1a
commit 4bbb86ae30
10 changed files with 7 additions and 49 deletions

View File

@@ -0,0 +1,21 @@
#! /bin/sh
# Generate a block.
set -e
. `dirname $0`/vars.sh
INIT=$1
# Initially we need 100 blocks so coinbase matures, giving us funds.
if [ -n "$INIT" ]; then
# To activate segwit via BIP9, we need at least 432 blocks!
$CLI generate 432
if $CLI getblockchaininfo | tr -s '\012\011 ' ' ' | grep -q '{ "id": "witness", "status": "active" }'; then :
else
echo "Segwit not activated after 432 blocks?" >&2
$CLI getblockchaininfo >&2
exit 1
fi
else
$CLI generate 1
fi