mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 06:01:48 +02:00
multi: rename chan DB Open method to OpenForTesting
This commit is contained in:
@@ -37,11 +37,7 @@ var (
|
||||
func initHintCache(t *testing.T) *channeldb.HeightHintCache {
|
||||
t.Helper()
|
||||
|
||||
db, err := channeldb.Open(t.TempDir())
|
||||
require.NoError(t, err, "unable to create db")
|
||||
t.Cleanup(func() {
|
||||
require.NoError(t, db.Close())
|
||||
})
|
||||
db := channeldb.OpenForTesting(t, t.TempDir())
|
||||
|
||||
testCfg := channeldb.CacheConfig{
|
||||
QueryDisable: false,
|
||||
|
@@ -33,11 +33,7 @@ var (
|
||||
func initHintCache(t *testing.T) *channeldb.HeightHintCache {
|
||||
t.Helper()
|
||||
|
||||
db, err := channeldb.Open(t.TempDir())
|
||||
require.NoError(t, err, "unable to create db")
|
||||
t.Cleanup(func() {
|
||||
require.NoError(t, db.Close())
|
||||
})
|
||||
db := channeldb.OpenForTesting(t, t.TempDir())
|
||||
|
||||
testCfg := channeldb.CacheConfig{
|
||||
QueryDisable: false,
|
||||
|
@@ -1906,10 +1906,8 @@ func TestInterfaces(t *testing.T, targetBackEnd string) {
|
||||
|
||||
// Initialize a height hint cache for each notifier.
|
||||
tempDir := t.TempDir()
|
||||
db, err := channeldb.Open(tempDir)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to create db: %v", err)
|
||||
}
|
||||
db := channeldb.OpenForTesting(t, tempDir)
|
||||
|
||||
testCfg := channeldb.CacheConfig{
|
||||
QueryDisable: false,
|
||||
}
|
||||
|
Reference in New Issue
Block a user