From fb3bc04d65e64d97f4a05f05e978ab5785255ed7 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 5 Jan 2017 13:17:49 -0800 Subject: [PATCH] test: mine enough blocks to active CSV+segwit in integration tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As we’re switching to a more up to date btcd branch that properly guards the activation of the soft-forks we rely on, we’ll also need to ensure the two soft-forks have activated. --- lnd_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lnd_test.go b/lnd_test.go index 23a2b9fd..7fe7ca3b 100644 --- a/lnd_test.go +++ b/lnd_test.go @@ -1446,6 +1446,13 @@ func TestLightningNetworkDaemon(t *testing.T) { ht.Fatalf("unable to request transaction notifications: %v", err) } + // Next mine enough blocks in order for segwit and the CSV package + // soft-fork to activate on SimNet. + numBlocks := chaincfg.SimNetParams.MinerConfirmationWindow * 2 + if _, err := btcdHarness.Node.Generate(numBlocks); err != nil { + ht.Fatalf("unable to generate blocks: %v", err) + } + // With the btcd harness created, we can now complete the // initialization of the network. args - list of lnd arguments, // example: "--debuglevel=debug"