Skip to content

Commit b674937

Browse files
ellemoutonguggero
authored andcommitted
itest: specify fee service URL
So that we use static fees in tests. This update is required with the latest LND update because of [this](lightningnetwork/lnd@b89387a) diff.
1 parent 3ef27df commit b674937

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

itest/litd_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99

1010
"github.com/btcsuite/btclog/v2"
1111
"github.com/lightningnetwork/lnd/lntest"
12+
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
1213
"github.com/stretchr/testify/require"
1314
)
1415

@@ -49,6 +50,7 @@ func TestLightningTerminal(t *testing.T) {
4950
)
5051

5152
feeService := lntest.NewFeeService(t)
53+
feeService.SetFeeRate(chainfee.FeePerKwFloor, 1)
5254
lndHarness := lntest.SetupHarness(
5355
t1, lndBinary, "bbolt", true, feeService,
5456
)
@@ -71,7 +73,7 @@ func TestLightningTerminal(t *testing.T) {
7173

7274
lndSubTest := lndHarness.Subtest(t1)
7375
litdHarness, err := NewNetworkHarness(
74-
lndSubTest, chainBackend, binary,
76+
lndSubTest, chainBackend, binary, feeService,
7577
)
7678
require.NoError(t1, err)
7779

itest/network_harness.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ type NetworkHarness struct {
4949
Miner *miner.HarnessMiner
5050

5151
LNDHarness *lntest.HarnessTest
52+
feeService lntest.WebFeeService
5253

5354
// server is an instance of the local Loop/Pool mock server.
5455
server *ServerHarness
@@ -77,7 +78,8 @@ type NetworkHarness struct {
7778

7879
// NewNetworkHarness creates a new network test harness.
7980
func NewNetworkHarness(lndHarness *lntest.HarnessTest, b node.BackendConfig,
80-
litdBinary string) (*NetworkHarness, error) {
81+
litdBinary string, feeService lntest.WebFeeService) (*NetworkHarness,
82+
error) {
8183

8284
n := NetworkHarness{
8385
activeNodes: make(map[int]*HarnessNode),
@@ -88,6 +90,7 @@ func NewNetworkHarness(lndHarness *lntest.HarnessTest, b node.BackendConfig,
8890
LNDHarness: lndHarness,
8991
BackendCfg: b,
9092
litdBinary: litdBinary,
93+
feeService: feeService,
9194
}
9295
return &n, nil
9396
}
@@ -313,6 +316,7 @@ func (n *NetworkHarness) newNode(t *testing.T, name string, extraArgs,
313316
NetParams: n.netParams,
314317
ExtraArgs: extraArgs,
315318
SkipUnlock: skipUnlock,
319+
FeeURL: n.feeService.URL(),
316320
}
317321
for _, opt := range opts {
318322
opt(baseCfg)

0 commit comments

Comments
 (0)