mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 23:53:41 +02:00
itest: use ht.CreateSimpleNetwork
whenever applicable
So we won't forget to assert the topology after opening a chain of channels.
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/lnrpc/devrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
|
||||
"github.com/lightningnetwork/lnd/lntest"
|
||||
"github.com/lightningnetwork/lnd/lntest/node"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -16,12 +17,14 @@ import (
|
||||
// NOTE FOR REVIEW: this could be improved by blasting the channel with HTLC
|
||||
// traffic on both sides to increase the surface area of the change under test.
|
||||
func testQuiescence(ht *lntest.HarnessTest) {
|
||||
alice := ht.NewNodeWithCoins("Alice", nil)
|
||||
bob := ht.NewNode("Bob", nil)
|
||||
cfg := node.CfgAnchor
|
||||
chanPoints, nodes := ht.CreateSimpleNetwork(
|
||||
[][]string{cfg, cfg}, lntest.OpenChannelParams{
|
||||
Amt: btcutil.Amount(1000000),
|
||||
})
|
||||
|
||||
chanPoint := ht.OpenChannel(bob, alice, lntest.OpenChannelParams{
|
||||
Amt: btcutil.Amount(1000000),
|
||||
})
|
||||
alice, bob := nodes[0], nodes[1]
|
||||
chanPoint := chanPoints[0]
|
||||
|
||||
res := alice.RPC.Quiesce(&devrpc.QuiescenceRequest{
|
||||
ChanId: chanPoint,
|
||||
|
Reference in New Issue
Block a user