From 2436207a7aa5d768c47df36e4b81ddbd3aa78a0a Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sat, 25 Jun 2016 14:07:47 +0930 Subject: [PATCH] test: detect segwit correctly, assume master branch. Segwit was merged, but the strings changed between there and segwit4 (also, my BIP9 patch changed the output). Signed-off-by: Rusty Russell --- README.md | 3 --- daemon/test/scripts/generate-block.sh | 2 +- daemon/test/scripts/setup.sh | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7d92599af..eac7952e3 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,6 @@ advertise their IP addresses, publish routes and fees, and use that information to pay specific nodes. These details are currently being hashed out on the [mailing list](https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev) and the IRC channel [#lightning-dev](https://botbot.me/freenode/lightning-dev/) on Freenode. -The protocol requires features not currently in bitcoin, so you will need -Pieter Wuille's Segregated Witness bitcoind: https://github.com/sipa/bitcoin/tree/segwit4 - Final note: This is very much a testbed and work in progress; expect All The Things to change, all the time. diff --git a/daemon/test/scripts/generate-block.sh b/daemon/test/scripts/generate-block.sh index 273f6e0a4..4f5320b5e 100755 --- a/daemon/test/scripts/generate-block.sh +++ b/daemon/test/scripts/generate-block.sh @@ -10,7 +10,7 @@ INIT=$1 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 : + if $CLI getblockchaininfo | tr -s '\012\011 ' ' ' | grep -q '"segwit": { "status": "active",'; then : else echo "Segwit not activated after 432 blocks?" >&2 $CLI getblockchaininfo >&2 diff --git a/daemon/test/scripts/setup.sh b/daemon/test/scripts/setup.sh index 99327d3c3..e7ada945c 100755 --- a/daemon/test/scripts/setup.sh +++ b/daemon/test/scripts/setup.sh @@ -29,10 +29,10 @@ while ! $CLI getinfo >/dev/null 2>&1; do done # Make sure they have segwit support! -if $CLI getblockchaininfo | grep -q '"witness"'; then : +if $CLI getblockchaininfo | grep -q '"segwit"'; then : else echo This bitcoind does not have segwit support. >&2 - echo Please install one from https://github.com/sipa/bitcoin/tree/segwit4 >&2 + echo Please install a recent one >&2 exit 1 fi