From 4665f3d80e07dd88c0e003510dd2bf11783f74e6 Mon Sep 17 00:00:00 2001 From: Jan Sarenik Date: Tue, 27 Feb 2018 19:33:09 +0100 Subject: [PATCH 1/3] test_lightningd.py: Enable bech32 test for DEVELOPER Since bitcoind 0.16 is already released it is safe to enable this test already. --- tests/test_lightningd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index 0babf78beb3b..5f9116236c7f 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -2715,7 +2715,7 @@ def test_closing_negotiation_reconnect(self): l2.daemon.wait_for_logs(['sendrawtx exit 0', ' to CLOSINGD_COMPLETE']) assert l1.bitcoin.rpc.getmempoolinfo()['size'] == 1 - @unittest.skip("FIXME: needs bitcoind 0.16") + @unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1") def test_bech32_funding(self): # Don't get any funds from previous runs. l1 = self.node_factory.get_node(random_hsm=True) From fcdf50292bb0db283adb20ecef4edb6caf7e9e1c Mon Sep 17 00:00:00 2001 From: Jan Sarenik Date: Wed, 28 Feb 2018 07:32:47 +0100 Subject: [PATCH 2/3] test_lightningd.py: 100 blocks should be enough now Rusty wrote at https://github.com/ElementsProject/lightning/pull/1127 On Tue, Feb 27, 2018 at 19:51:06 +0000 (UTC): > Please also remove the 432-block check in test_lightning.py > too: we now only need to generate 100 blocks (to get some funds > to spend). Might speed up tests a little, too. --- tests/test_lightningd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index 5f9116236c7f..2471db737158 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -52,9 +52,9 @@ def setupBitcoind(directory): info = bitcoind.rpc.getblockchaininfo() # Make sure we have segwit and some funds - if info['blocks'] < 432: + if info['blocks'] < 100: logging.debug("SegWit not active, generating some more blocks") - bitcoind.generate_block(432 - info['blocks']) + bitcoind.generate_block(100 - info['blocks']) elif bitcoind.rpc.getwalletinfo()['balance'] < 1: logging.debug("Insufficient balance, generating 1 block") bitcoind.generate_block(1) From d8c80ca9aa185fa590cdb339ea2147935d6947d5 Mon Sep 17 00:00:00 2001 From: Jan Sarenik Date: Tue, 27 Feb 2018 20:32:40 +0100 Subject: [PATCH 3/3] Dockerfile: Update bitcoin-core to 0.16.0 Uses BITCOIN_VERSION ENV variable in the beggining of Dockerfile. --- contrib/Dockerfile.builder | 8 +++++--- contrib/Dockerfile.builder.i386 | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/contrib/Dockerfile.builder b/contrib/Dockerfile.builder index 4b6f83552710..fb2168d111ef 100644 --- a/contrib/Dockerfile.builder +++ b/contrib/Dockerfile.builder @@ -2,6 +2,7 @@ FROM ubuntu:16.04 MAINTAINER Christian Decker ENV DEBIAN_FRONTEND noninteractive +ENV BITCOIN_VERSION 0.16.0 WORKDIR /build RUN apt-get -qq update && \ @@ -30,10 +31,11 @@ RUN apt-get -qq update && \ rm -rf /var/lib/apt/lists/* RUN cd /tmp/ && \ - wget https://bitcoin.org/bin/bitcoin-core-0.15.1/bitcoin-0.15.1-x86_64-linux-gnu.tar.gz -O bitcoin.tar.gz && \ + VER=$BITCOIN_VERSION && \ + wget https://bitcoin.org/bin/bitcoin-core-$VER/bitcoin-$VER-x86_64-linux-gnu.tar.gz -O bitcoin.tar.gz && \ tar -xvzf bitcoin.tar.gz && \ - mv /tmp/bitcoin-0.15.1/bin/bitcoin* /usr/local/bin/ && \ - rm -rf bitcoin.tar.gz /tmp/bitcoin-0.15.1 + mv /tmp/bitcoin-$VER/bin/bitcoin* /usr/local/bin/ && \ + rm -rf bitcoin.tar.gz /tmp/bitcoin-$VER RUN pip3 install --upgrade pip && \ pip3 install python-bitcoinlib==0.7.0 pytest==3.0.5 setuptools==36.6.0 pytest-test-groups==1.0.3 flake8==3.5.0 pytest-rerunfailures==3.1 diff --git a/contrib/Dockerfile.builder.i386 b/contrib/Dockerfile.builder.i386 index 79ebfa00a90c..5ff21010ae4b 100644 --- a/contrib/Dockerfile.builder.i386 +++ b/contrib/Dockerfile.builder.i386 @@ -2,6 +2,7 @@ FROM i386/ubuntu:16.04 MAINTAINER Christian Decker ENV DEBIAN_FRONTEND noninteractive +ENV BITCOIN_VERSION 0.16.0 WORKDIR /build RUN apt-get -qq update && \ @@ -30,10 +31,11 @@ RUN apt-get -qq update && \ rm -rf /var/lib/apt/lists/* RUN cd /tmp/ && \ - wget https://bitcoin.org/bin/bitcoin-core-0.15.1/bitcoin-0.15.1-i686-pc-linux-gnu.tar.gz -O bitcoin.tar.gz && \ + VER=$BITCOIN_VERSION && \ + wget https://bitcoin.org/bin/bitcoin-core-$VER/bitcoin-$VER-i686-pc-linux-gnu.tar.gz -O bitcoin.tar.gz && \ tar -xvzf bitcoin.tar.gz && \ - mv /tmp/bitcoin-0.15.1/bin/bitcoin* /usr/local/bin/ && \ - rm -rf bitcoin.tar.gz /tmp/bitcoin-0.15.1 + mv /tmp/bitcoin-$VER/bin/bitcoin* /usr/local/bin/ && \ + rm -rf bitcoin.tar.gz /tmp/bitcoin-$VER RUN pip3 install --upgrade pip && \ pip3 install python-bitcoinlib==0.7.0 pytest==3.0.5 setuptools==36.6.0 pytest-test-groups==1.0.3 flake8==3.5.0 pytest-rerunfailures==3.1