Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

itest: reproduce max new nodes hang bug #8578

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions itest/list_on_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ package itest
import "github.com/lightningnetwork/lnd/lntest"

var allTestCases = []*lntest.TestCase{
{
Name: "max new nodes",
TestFunc: testMaxNewNodes,
},
{
Name: "update channel status",
TestFunc: testUpdateChanStatus,
Expand Down
17 changes: 17 additions & 0 deletions itest/lnd_misc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1281,3 +1281,20 @@ func testNativeSQLNoMigration(ht *lntest.HarnessTest) {
alice.SetExtraArgs(nil)
require.NoError(ht, alice.Start(ht.Context()))
}

// testMaxNewNodes reproduces the issue where the maximum number of nodes that
// can be created is limited to 6. Attempting to create a 7th node should result
// in a hang.
func testMaxNewNodes(ht *lntest.HarnessTest) {
// Create three new nodes.
ht.Log("Creating 6 new nodes")
ht.NewNode("node-1", nil)
ht.NewNode("node-2", nil)
ht.NewNode("node-3", nil)
ht.NewNode("node-4", nil)
ht.NewNode("node-5", nil)
ht.NewNode("node-6", nil)

ht.Log("Attempting to create a 7th node")
ht.NewNode("node-7", nil)
}