macaroons: convert to use new kvdb abstraction
This commit is contained in:
4 files changed
+28
-25
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user