contractcourt: convert to use new kvdb abstraction

This commit is contained in:
Olaoluwa Osuntokun committed 2020-03-18 19:34:52 -07:00
1 parent f0911765af
commit 320101d054
4 files changed
+44 -43

No files matched your search

+3 -3
View File
@@ -14,9 +14,9 @@ import (
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/coreos/bbolt"
"github.com/davecgh/go-spew/spew"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/channeldb/kvdb"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/lnwallet"
)
@@ -104,7 +104,7 @@ var (
}
)
func makeTestDB() (*bbolt.DB, func(), error) {
func makeTestDB() (kvdb.Backend, func(), error) {
// First, create a temporary directory to be used for the duration of
// this test.
tempDirName, err := ioutil.TempDir("", "arblog")
@@ -112,7 +112,7 @@ func makeTestDB() (*bbolt.DB, func(), error) {
return nil, nil, err
}
db, err := bbolt.Open(tempDirName+"/test.db", 0600, nil)
db, err := kvdb.Create(kvdb.BoltBackendName, tempDirName+"/test.db", true)
if err != nil {
return nil, nil, err
}