mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-05-31 10:10:31 +02:00
chainntnfs: fix race unit test issue
Because we pass in the same config into multiple notifiers, we sometimes get a data race in the unit tests. By creating a copy of the config we avoid that.
This commit is contained in:
parent
ab422ba184
commit
17b93db5cc
@ -1953,9 +1953,10 @@ func TestInterfaces(t *testing.T, targetBackEnd string) {
|
||||
}
|
||||
|
||||
case "btcd":
|
||||
configCopy := rpcConfig
|
||||
newNotifier = func() (chainntnfs.TestChainNotifier, error) {
|
||||
return btcdnotify.New(
|
||||
&rpcConfig, unittest.NetParams,
|
||||
&configCopy, unittest.NetParams,
|
||||
hintCache, hintCache, blockCache,
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user