macaroons: convert to use new kvdb abstraction

This commit is contained in:
Olaoluwa Osuntokun committed 2020-03-18 19:35:04 -07:00
1 parent 557b930c5f
commit 852b2380a9
4 files changed
+28 -25

No files matched your search

+3 -3
View File
@@ -7,7 +7,7 @@ import (
"os"
"path"
"github.com/coreos/bbolt"
"github.com/lightningnetwork/lnd/channeldb/kvdb"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
@@ -48,8 +48,8 @@ func NewService(dir string, checks ...Checker) (*Service, error) {
// Open the database that we'll use to store the primary macaroon key,
// and all generated macaroons+caveats.
macaroonDB, err := bbolt.Open(
path.Join(dir, DBFilename), 0600, bbolt.DefaultOptions,
macaroonDB, err := kvdb.Create(
kvdb.BoltBackendName, path.Join(dir, DBFilename), true,
)
if err != nil {
return nil, err