mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 10:39:49 +01:00
0b50a7c9eb
Doesn't support getblockheader, also some occasional weirdness with sequence enforcement for mempool? Occasionally I could get my spend tx into the mempool (doesn't happen with bitcoin). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
27 lines
471 B
Bash
Executable File
27 lines
471 B
Bash
Executable File
#! /bin/sh
|
|
# Generate a block.
|
|
|
|
set -e
|
|
|
|
. `dirname $0`/vars.sh
|
|
INIT=$1
|
|
|
|
case $STYLE in
|
|
alpha)
|
|
# This is a one-shot in alpha, it seems.
|
|
$CLI setgenerate true
|
|
# Avoid median time bug by generating 11 blocks
|
|
if [ -n "$INIT" ]; then
|
|
for i in `seq 11`; do $CLI setgenerate true; done
|
|
fi
|
|
;;
|
|
bitcoin)
|
|
# Initially we need 100 blocks so coinbase matures, giving us funds.
|
|
if [ -n "$INIT" ]; then
|
|
$CLI generate 101
|
|
else
|
|
$CLI generate 1
|
|
fi
|
|
;;
|
|
esac
|