Skip to content

Commit

Permalink
eliminate revokeunfunded switch
Browse files Browse the repository at this point in the history
  • Loading branch information
chappjc committed Feb 10, 2021
1 parent fd8fe98 commit 5972945
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 32 deletions.
43 changes: 21 additions & 22 deletions client/cmd/dexc/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,28 +73,27 @@ func defaultHostByNetwork(network dex.Network) string {

// Config is the configuration for the DEX client application.
type Config struct {
AppData string `long:"appdata" description:"Path to application directory."`
Config string `long:"config" description:"Path to an INI configuration file."`
DBPath string `long:"db" description:"Database filepath. Database will be created if it does not exist."`
RPCOn bool `long:"rpc" description:"turn on the rpc server"`
RPCAddr string `long:"rpcaddr" description:"RPC server listen address"`
RPCUser string `long:"rpcuser" description:"RPC server user name"`
RPCPass string `long:"rpcpass" description:"RPC server password"`
RPCCert string `long:"rpccert" description:"RPC server certificate file location"`
RPCKey string `long:"rpckey" description:"RPC server key file location"`
WebAddr string `long:"webaddr" description:"HTTP server address"`
NoWeb bool `long:"noweb" description:"disable the web server."`
Testnet bool `long:"testnet" description:"use testnet"`
Simnet bool `long:"simnet" description:"use simnet"`
ReloadHTML bool `long:"reload-html" description:"Reload the webserver's page template with every request. For development purposes."`
DebugLevel string `long:"log" description:"Logging level {trace, debug, info, warn, error, critical}"`
LocalLogs bool `long:"loglocal" description:"Use local time zone time stamps in log entries."`
ShowVer bool `short:"V" long:"version" description:"Display version information and exit"`
TorProxy string `long:"torproxy" description:"Connect via TOR (eg. 127.0.0.1:9050)."`
TorIsolation bool `long:"torisolation" description:"Enable TOR circuit isolation."`
RevokeUnfunded bool `long:"revokeunfunded" description:"Revoke any orders and their matches on startup that are unexpectedly unfunded."`
Net dex.Network
CertHosts []string
AppData string `long:"appdata" description:"Path to application directory."`
Config string `long:"config" description:"Path to an INI configuration file."`
DBPath string `long:"db" description:"Database filepath. Database will be created if it does not exist."`
RPCOn bool `long:"rpc" description:"turn on the rpc server"`
RPCAddr string `long:"rpcaddr" description:"RPC server listen address"`
RPCUser string `long:"rpcuser" description:"RPC server user name"`
RPCPass string `long:"rpcpass" description:"RPC server password"`
RPCCert string `long:"rpccert" description:"RPC server certificate file location"`
RPCKey string `long:"rpckey" description:"RPC server key file location"`
WebAddr string `long:"webaddr" description:"HTTP server address"`
NoWeb bool `long:"noweb" description:"disable the web server."`
Testnet bool `long:"testnet" description:"use testnet"`
Simnet bool `long:"simnet" description:"use simnet"`
ReloadHTML bool `long:"reload-html" description:"Reload the webserver's page template with every request. For development purposes."`
DebugLevel string `long:"log" description:"Logging level {trace, debug, info, warn, error, critical}"`
LocalLogs bool `long:"loglocal" description:"Use local time zone time stamps in log entries."`
ShowVer bool `short:"V" long:"version" description:"Display version information and exit"`
TorProxy string `long:"torproxy" description:"Connect via TOR (eg. 127.0.0.1:9050)."`
TorIsolation bool `long:"torisolation" description:"Enable TOR circuit isolation."`
Net dex.Network
CertHosts []string
}

var defaultConfig = Config{
Expand Down
11 changes: 5 additions & 6 deletions client/cmd/dexc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,11 @@ func main() {

// Prepare the Core.
clientCore, err := core.New(&core.Config{
DBPath: cfg.DBPath, // global set in config.go
Net: cfg.Net,
Logger: logMaker.Logger("CORE"),
TorProxy: cfg.TorProxy,
TorIsolation: cfg.TorIsolation,
RevokeUnfunded: cfg.RevokeUnfunded,
DBPath: cfg.DBPath, // global set in config.go
Net: cfg.Net,
Logger: logMaker.Logger("CORE"),
TorProxy: cfg.TorProxy,
TorIsolation: cfg.TorIsolation,
})
if err != nil {
fmt.Fprintf(os.Stderr, "error creating client core: %v\n", err)
Expand Down
4 changes: 0 additions & 4 deletions client/core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -815,10 +815,6 @@ type Config struct {
TorProxy string
// TorIsolation specifies whether to enable Tor circuit isolation.
TorIsolation bool
// RevokeUnfunded indicates if orders lacking funding coins on startup
// should be revoked. If false, they are not loaded in case there is an
// issue with the user's wallet that they can resolve.
RevokeUnfunded bool
}

// Core is the core client application. Core manages DEX connections, wallets,
Expand Down

0 comments on commit 5972945

Please sign in to comment.