Merge pull request #8584 from yyforyongyu/fix-unit-race
chainntnfs: fix race in `TestInterfaces`
This commit is contained in:
1 file changed
+2
-3
@@ -1893,7 +1893,6 @@ func TestInterfaces(t *testing.T, targetBackEnd string) {
|
|||||||
// play around with.
|
// play around with.
|
||||||
miner := unittest.NewMiner(t, unittest.NetParams, nil, true, 25)
|
miner := unittest.NewMiner(t, unittest.NetParams, nil, true, 25)
|
||||||
|
|
||||||
rpcConfig := miner.RPCConfig()
|
|
||||||
p2pAddr := miner.P2PAddress()
|
p2pAddr := miner.P2PAddress()
|
||||||
|
|
||||||
log.Printf("Running %v ChainNotifier interface tests",
|
log.Printf("Running %v ChainNotifier interface tests",
|
||||||
@@ -1953,10 +1952,10 @@ func TestInterfaces(t *testing.T, targetBackEnd string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "btcd":
|
case "btcd":
|
||||||
configCopy := rpcConfig
|
rpcConfig := miner.RPCConfig()
|
||||||
newNotifier = func() (chainntnfs.TestChainNotifier, error) {
|
newNotifier = func() (chainntnfs.TestChainNotifier, error) {
|
||||||
return btcdnotify.New(
|
return btcdnotify.New(
|
||||||
&configCopy, unittest.NetParams,
|
&rpcConfig, unittest.NetParams,
|
||||||
hintCache, hintCache, blockCache,
|
hintCache, hintCache, blockCache,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user