Commit 4e19ab31 authored by acud's avatar acud Committed by GitHub

remove var declaration for storer (#540)

parent f13b2d3e
...@@ -219,10 +219,7 @@ func NewBee(o Options) (*Bee, error) { ...@@ -219,10 +219,7 @@ func NewBee(o Options) (*Bee, error) {
logger.Debugf("p2p address: %s", addr) logger.Debugf("p2p address: %s", addr)
} }
var ( var path string
storer storage.Storer
path = ""
)
if o.DataDir != "" { if o.DataDir != "" {
path = filepath.Join(o.DataDir, "localstore") path = filepath.Join(o.DataDir, "localstore")
...@@ -230,7 +227,7 @@ func NewBee(o Options) (*Bee, error) { ...@@ -230,7 +227,7 @@ func NewBee(o Options) (*Bee, error) {
lo := &localstore.Options{ lo := &localstore.Options{
Capacity: o.DBCapacity, Capacity: o.DBCapacity,
} }
storer, err = localstore.New(path, address.Bytes(), lo, logger) storer, err := localstore.New(path, address.Bytes(), lo, logger)
if err != nil { if err != nil {
return nil, fmt.Errorf("localstore: %w", err) return nil, fmt.Errorf("localstore: %w", err)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment