Skip to content
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

-usecashaddr problems when using --disable-wallet #2075

Open
sickpig opened this issue Jan 23, 2020 · 0 comments
Open

-usecashaddr problems when using --disable-wallet #2075

sickpig opened this issue Jan 23, 2020 · 0 comments

Comments

@sickpig
Copy link
Collaborator

sickpig commented Jan 23, 2020

if --disable-wallet is passed to the configure script using usecashaddr will produce an error on startup.

This is due to the fact that usecashaddr is considered valid only in the presence of the wallet functionality.

Even if usecashaddr got compiled in w/ wallet disabled via a path like the one at the bottom, the parameter is not honored anyway.

diff --git a/src/allowed_args.cpp b/src/allowed_args.cpp
index 1b759f878..52e61c76a 100644
--- a/src/allowed_args.cpp
+++ b/src/allowed_args.cpp
@@ -318,7 +318,12 @@ static void addGeneralOptions(AllowedArgs &allowedArgs, HelpMessageMode mode)
         .addArg("reindex", optionalBool, _("Rebuild block chain index from current blk000??.dat files on startup"))
         .addArg("txindex", optionalBool,
             strprintf(_("Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)"),
-                    DEFAULT_TXINDEX));
+                    DEFAULT_TXINDEX))
+        .addArg(
+            "usecashaddr", optionalBool,
+            strprintf(
+                _("Use Bitcoin Cash Address for destination encoding (Activates by default Jan 14, 2017, default %u)"),
+                true));
 }
 
 static void addConnectionOptions(AllowedArgs &allowedArgs)
@@ -488,9 +493,6 @@ static void addWalletOptions(AllowedArgs &allowedArgs)
               "startup") +
                 " " +
                 _("(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)"),
-            walletParamOptional)
-        .addArg("usecashaddr", optionalBool,
-            _("Use Bitcoin Cash Address for destination encoding (Activates by default Jan 14, 2017)"),
             walletParamOptional);
 }
 #endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant