Merge pull request #3924 from guggero/itest-scrypt

itest: use fast scrypt options for aezeed, macaroons DB and wallet DB
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2020-03-26 16:20:31 -07:00
commit d9bcd711d7
11 files changed
+109 -17

No files matched your search

+25 -9
View File
@@ -7328,10 +7328,12 @@ func testRevokedCloseRetribution(net *lntest.NetworkHarness, t *harnessTest) {
// Carol will be the breached party. We set --nolisten to ensure Bob
// won't be able to connect to her and trigger the channel data
// protection logic automatically.
// protection logic automatically. We also can't have Carol
// automatically re-connect too early, otherwise DLP would be initiated
// instead of the breach we want to provoke.
carol, err := net.NewNode(
"Carol",
[]string{"--hodl.exit-settle", "--nolisten"},
[]string{"--hodl.exit-settle", "--nolisten", "--minbackoff=1h"},
)
if err != nil {
t.Fatalf("unable to create new carol node: %v", err)
@@ -7591,10 +7593,12 @@ func testRevokedCloseRetributionZeroValueRemoteOutput(net *lntest.NetworkHarness
// Dave will be the breached party. We set --nolisten to ensure Carol
// won't be able to connect to him and trigger the channel data
// protection logic automatically.
// protection logic automatically. We also can't have Dave automatically
// re-connect too early, otherwise DLP would be initiated instead of the
// breach we want to provoke.
dave, err := net.NewNode(
"Dave",
[]string{"--hodl.exit-settle", "--nolisten"},
[]string{"--hodl.exit-settle", "--nolisten", "--minbackoff=1h"},
)
if err != nil {
t.Fatalf("unable to create new node: %v", err)
@@ -8658,15 +8662,23 @@ func assertDLPExecuted(net *lntest.NetworkHarness, t *harnessTest,
dave *lntest.HarnessNode, daveStartingBalance int64,
anchors bool) {
// We disabled auto-reconnect for some tests to avoid timing issues.
// To make sure the nodes are initiating DLP now, we have to manually
// re-connect them.
ctxb := context.Background()
err := net.ConnectNodes(ctxb, carol, dave)
if err != nil && !strings.Contains(err.Error(), "already connected") {
t.Fatalf("unable to connect Carol to Dave to initiate DLP: %v",
err)
}
// Upon reconnection, the nodes should detect that Dave is out of sync.
// Carol should force close the channel using her latest commitment.
expectedTxes := 1
if anchors {
expectedTxes = 2
}
ctxb := context.Background()
_, err := waitForNTxsInMempool(
_, err = waitForNTxsInMempool(
net.Miner.Node, expectedTxes, minerMempoolTimeout,
)
if err != nil {
@@ -8777,8 +8789,12 @@ func testDataLossProtection(net *lntest.NetworkHarness, t *harnessTest) {
// Carol will be the up-to-date party. We set --nolisten to ensure Dave
// won't be able to connect to her and trigger the channel data
// protection logic automatically.
carol, err := net.NewNode("Carol", []string{"--nolisten"})
// protection logic automatically. We also can't have Carol
// automatically re-connect too early, otherwise DLP would be initiated
// at the wrong moment.
carol, err := net.NewNode(
"Carol", []string{"--nolisten", "--minbackoff=1h"},
)
if err != nil {
t.Fatalf("unable to create new carol node: %v", err)
}
+1 -1
View File
@@ -23,5 +23,5 @@ const (
// AsyncBenchmarkTimeout is the timeout used when running the async
// payments benchmark.
AsyncBenchmarkTimeout = time.Minute
AsyncBenchmarkTimeout = 2 * time.Minute
)