multi: change NewBitcoindBackend to take a miner as its param

Prepares for the following commit where we assert the chain backend is
synced to the miner.
This commit is contained in:
yyforyongyu committed 2025-02-26 19:51:52 +08:00
1 parent c725ba9f25
commit 99d49dec6a
5 files changed
+22 -25

No files matched your search

+2 -2
View File
@@ -83,7 +83,7 @@ func NewMiner(t *testing.T, netParams *chaincfg.Params, extraArgs []string,
// used for block and tx notifications or if its ZMQ interface should be used.
// A connection to the newly spawned bitcoind node is returned.
func NewBitcoindBackend(t *testing.T, netParams *chaincfg.Params,
minerAddr string, txindex, rpcpolling bool) *chain.BitcoindConn {
miner *rpctest.Harness, txindex, rpcpolling bool) *chain.BitcoindConn {
t.Helper()
@@ -204,7 +204,7 @@ func NewBitcoindBackend(t *testing.T, netParams *chaincfg.Params,
require.NoError(t, err, "failed to create RPC client")
// Connect to the miner node.
err = rpcClient.AddNode(minerAddr, rpcclient.ANAdd)
err = rpcClient.AddNode(miner.P2PAddress(), rpcclient.ANAdd)
require.NoError(t, err, "failed to connect to miner")
// Get the network info and assert the num of outbound connections is 1.