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
2025-02-25 21:33:16 +08:00
parent c725ba9f25
commit 99d49dec6a
5 changed files with 22 additions and 25 deletions

View File

@@ -179,7 +179,7 @@ func testHistoricalConfDetailsTxIndex(t *testing.T, rpcPolling bool) {
)
bitcoindConn := unittest.NewBitcoindBackend(
t, unittest.NetParams, miner.P2PAddress(), true, rpcPolling,
t, unittest.NetParams, miner, true, rpcPolling,
)
hintCache := initHintCache(t)
@@ -279,7 +279,7 @@ func testHistoricalConfDetailsNoTxIndex(t *testing.T, rpcpolling bool) {
miner := unittest.NewMiner(t, unittest.NetParams, nil, true, 25)
bitcoindConn := unittest.NewBitcoindBackend(
t, unittest.NetParams, miner.P2PAddress(), false, rpcpolling,
t, unittest.NetParams, miner, false, rpcpolling,
)
hintCache := initHintCache(t)

View File

@@ -1932,7 +1932,7 @@ func TestInterfaces(t *testing.T, targetBackEnd string) {
case "bitcoind":
var bitcoindConn *chain.BitcoindConn
bitcoindConn = unittest.NewBitcoindBackend(
t, unittest.NetParams, p2pAddr, true, false,
t, unittest.NetParams, miner, true, false,
)
newNotifier = func() (chainntnfs.TestChainNotifier, error) {
return bitcoindnotify.New(
@@ -1944,7 +1944,7 @@ func TestInterfaces(t *testing.T, targetBackEnd string) {
case "bitcoind-rpc-polling":
var bitcoindConn *chain.BitcoindConn
bitcoindConn = unittest.NewBitcoindBackend(
t, unittest.NetParams, p2pAddr, true, true,
t, unittest.NetParams, miner, true, true,
)
newNotifier = func() (chainntnfs.TestChainNotifier, error) {
return bitcoindnotify.New(