multi: move unit test backend funcs to new package

To avoid circular dependency issues between packages, we move the unit
test backend creation function to a new package in the lntest parent
package.
This commit is contained in:
Oliver Gugger committed 2024-03-18 16:13:39 +01:00
1 parent c170a9830b
commit d40312c36b
8 files changed
+250 -215

No files matched your search

+3 -3
View File
@@ -25,9 +25,9 @@ import (
_ "github.com/btcsuite/btcwallet/walletdb/bdb" // Required to register the boltdb walletdb implementation.
"github.com/lightninglabs/neutrino"
"github.com/lightningnetwork/lnd/blockcache"
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/kvdb"
"github.com/lightningnetwork/lnd/lntest/unittest"
"github.com/lightningnetwork/lnd/lntest/wait"
"github.com/stretchr/testify/require"
)
@@ -482,7 +482,7 @@ func testFilterBlockDisconnected(node *rpctest.Harness,
// Create a node that has a shorter chain than the main chain, so we
// can trigger a reorg.
reorgNode := chainntnfs.NewMiner(
reorgNode := unittest.NewMiner(
t, netParams, []string{"--txindex"}, true, 5,
)
@@ -984,7 +984,7 @@ func TestFilteredChainView(t *testing.T) {
// dedicated miner to generate blocks, cause re-orgs, etc. We'll set up
// this node with a chain length of 125, so we have plenty of BTC to
// play around with.
miner := chainntnfs.NewMiner(
miner := unittest.NewMiner(
t, netParams, []string{"--txindex"}, true, 25,
)