mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 16:14:23 +01:00
daemon/test: activate segwit.
You need to be running a bitcoind modified with segregated witness: https://github.com/sipa/bitcoin/tree/segwit4 It needs 432 blocks to activate it! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -8,7 +8,14 @@ INIT=$1
|
||||
|
||||
# Initially we need 100 blocks so coinbase matures, giving us funds.
|
||||
if [ -n "$INIT" ]; then
|
||||
$CLI generate 101
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user