chainntnfs+lntest: fix TestInterfaces

This commit upgrades the test to always use a segwit v0 witness program
when creating testing txns.
This commit is contained in:
yyforyongyu
2024-07-19 14:05:28 +08:00
parent f27f9f2799
commit 9fee656d70
2 changed files with 26 additions and 9 deletions

View File

@@ -59,6 +59,12 @@ func NewMiner(t *testing.T, netParams *chaincfg.Params, extraArgs []string,
t.Fatalf("unable to set up backend node: %v", err)
}
// Next mine enough blocks in order for segwit and the CSV package
// soft-fork to activate.
numBlocks := netParams.MinerConfirmationWindow*2 + 17
_, err = node.Client.Generate(numBlocks)
require.NoError(t, err, "failed to generate blocks")
return node
}