mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-21 22:11:41 +01: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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue