-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: Add "local" network to launcher, and --state-dir for the database #377
Conversation
@@ -74,15 +81,17 @@ main = do | |||
when (args `isPresent` (shortOption 'h')) $ help cli | |||
when (args `isPresent` (longOption "version")) $ putStrLn getVersion | |||
|
|||
network <- args `parseArg` longOption "network" | |||
let stateDir = args `getArg` (longOption "state-dir") | |||
let network = fromMaybe "testnet" $ args `getArg` (longOption "network") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small point, but parentheses are not actually needed in the above two lines.
@@ -62,9 +68,10 @@ Usage: | |||
cardano-wallet-launcher --version | |||
|
|||
Options: | |||
--network <STRING> testnet, staging, or mainnet [default: testnet] | |||
--network <STRING> testnet, staging, mainnet, or local [default: testnet] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is local
coming back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of Daedalus integrating with the wallet backend. They also need to be able to spin-up a local cluster for their own testing.
@@ -74,15 +81,17 @@ main = do | |||
when (args `isPresent` (shortOption 'h')) $ help cli | |||
when (args `isPresent` (longOption "version")) $ putStrLn getVersion | |||
|
|||
network <- args `parseArg` longOption "network" | |||
let stateDir = args `getArg` (longOption "state-dir") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to add integration test that'd check if the directory and contents are created correctly.
Could be here -> https://github.com/input-output-hk/cardano-wallet/tree/master/lib/http-bridge/test/integration/Test/Integration/Scenario/CLI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Rebased on top of latest master. Note that this PR also includes the change from #374.
a0a7a61
to
264a459
Compare
Changes the DBLayer to use SQLite. Without a given filename, it just uses the in-memory database.
Relates to issue #154
This branch is based on the branch of #377
Overview
--state-dir
. That can also control wherecardano-http-bridge
puts its files.cardano-http-bridge
fork supports--template local
, butcardano-wallet-launcher
wouldn't recognise that as a valid network.