mirror of
https://github.com/AthanorLabs/atomic-swap.git
synced 2026-01-07 21:34:05 -05:00
renamed swap database directory (#482)
This commit is contained in:
@@ -29,6 +29,12 @@ import (
|
||||
"github.com/athanorlabs/atomic-swap/rpc"
|
||||
)
|
||||
|
||||
const (
|
||||
// databaseDirName is the name of the folder, located in the swapd's
|
||||
// data-dir, for the current and past swap information.
|
||||
databaseDirName = "swap-db"
|
||||
)
|
||||
|
||||
var log = logging.Logger("daemon")
|
||||
|
||||
// SwapdConfig provides startup parameters for swapd.
|
||||
@@ -63,7 +69,7 @@ func RunSwapDaemon(ctx context.Context, conf *SwapdConfig) (err error) {
|
||||
// Initialize the database first, so the defer statement that closes it
|
||||
// will get executed last.
|
||||
sdb, err := db.NewDatabase(&chaindb.Config{
|
||||
DataDir: path.Join(conf.EnvConf.DataDir, "db"),
|
||||
DataDir: path.Join(conf.EnvConf.DataDir, databaseDirName),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -13,7 +13,7 @@ and `ENV` is the value from the `--env` flag (e.g. `stagenet`, `mainnet`).
|
||||
From here forward, we will use `{DATA_DIR}` to refer to this default value or the value
|
||||
passed with the `--data-dir` flag.
|
||||
|
||||
### {DATA_DIR}/db
|
||||
### {DATA_DIR}/swap-db
|
||||
|
||||
This is the location of swapd's (BadgerDB) database. Currently, it stores offers made so that
|
||||
they can be reloaded on restart. The database can be safely deleted if you don't have any offers
|
||||
|
||||
Reference in New Issue
Block a user