test: mine enough blocks to active CSV+segwit in integration tests

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.
This commit is contained in:
Olaoluwa Osuntokun 2017-01-05 13:17:49 -08:00
parent ad76899a57
commit fb3bc04d65
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
1 changed files with 7 additions and 0 deletions

View File

@ -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"