LayerTwo-Labs / bip300301_enforcer

CUSF software enforcing BIP300 and BIP301 rules.
1 stars 4 forks source link

cli: use sensible default for data_dir #53

Closed octobocto closed 1 week ago

octobocto commented 1 week ago

By default, set the data dir to a platform specific datadir. $XDG_DATA_HOME with a fallback to $HOME/.local/share for linux, $HOME/Library/Application Support for mac, and $APPDATA for windows.

Also uses this dir in the Validator.

Works on my machine!

Options:
      --data-dir <DATA_DIR>
          Directory to store wallet + drivechain + validator data [default: "/Users/bo/Library/Application Support/bip300301_enforcer"]
octobocto commented 1 week ago

We now end up with this directory layout, which I think is unfortunate

/Users/torkel/Library/Application Support/bip300301_enforcer
├── bip300301_enforcer
│   └── signet.mdb
│       ├── data.mdb
│       └── lock.mdb
├── db.sqlite
└── wallet.sqlite

Could make sense to split things into validator and wallet, IMO

Yes! That was a very confusing directory structure.. Thank you for the PR!