Windows 0.3.80 doesn't take non-default options from CLI

Post Reply
somename
Posts: 80
Joined: Mon Sep 15, 2014 3:12 pm
os: windows

Windows 0.3.80 doesn't take non-default options from CLI

Post by somename »

Here's how I run it:

C:\"Program Files (x86)"\Namecoin\namecoin-qt.exe -conf=e:\blockchain_nmc\namecoin.conf

In config file I specify walletpath and datadir. Neither of these three (conf, walletpath and datadir) have any effect.

Log:

namecoin version 0.3.80
Default data directory C:\Users\USER\AppData\Roaming\Namecoin
Bound to port 8334
Setup namecoin genesis block 000000000062b72c5e2ceb45fbc8587e807c155b0da735e6483dfba2f0a9c770
Loading addresses...
dbenv.open strLogDir=C:\Users\USERAppData\Roaming\Namecoin/database strErrorFile=C:\Users\USER\AppData\Roaming\Namecoin/db.log
Loaded 0 addresses
addresses 389ms
Loading block index...

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: Windows 0.3.80 doesn't take non-default options from CLI

Post by biolizard89 »

somename wrote:Here's how I run it:

C:\"Program Files (x86)"\Namecoin\namecoin-qt.exe -conf=e:\blockchain_nmc\namecoin.conf

In config file I specify walletpath and datadir. Neither of these three (conf, walletpath and datadir) have any effect.

Log:

namecoin version 0.3.80
Default data directory C:\Users\USER\AppData\Roaming\Namecoin
Bound to port 8334
Setup namecoin genesis block 000000000062b72c5e2ceb45fbc8587e807c155b0da735e6483dfba2f0a9c770
Loading addresses...
dbenv.open strLogDir=C:\Users\USERAppData\Roaming\Namecoin/database strErrorFile=C:\Users\USER\AppData\Roaming\Namecoin/db.log
Loaded 0 addresses
addresses 389ms
Loading block index...
Hmm, not sure why that would be the case. I haven't tested on Windows in quite a while... can anyone check whether this is fixed by Namecoin Core?
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

cassini
Posts: 336
Joined: Sun May 26, 2013 6:36 pm

Re: Windows 0.3.80 doesn't take non-default options from CLI

Post by cassini »

This is a bug, I'm afraid. Same problem in OSX. The Bitcoin devs fixed it with this commit but this is not compatible with our old CLI parsing code for Namecoin-Qt.

Namecoin Core, however, does contain the correct algorithm already, see
https://github.com/namecoin/namecore/bl ... o.cpp#L193


Workaround for @somename: Add the datadir parameter to your command line, e.g.

Code: Select all

C:\"Program Files (x86)"\Namecoin\namecoin-qt.exe -datadir=e:\blockchain_nmc -conf=e:\blockchain_nmc\namecoin.conf
Make sure you've removed the datadir line from your .conf file, otherwise walletpath and any other param in the conf file is being ignored.

somename
Posts: 80
Joined: Mon Sep 15, 2014 3:12 pm
os: windows

Re: Windows 0.3.80 doesn't take non-default options from CLI

Post by somename »

Thanks guys.
I in fact tried the workaround offered by @cassini before, and also now (with datadir removed from the conf file), but it still doesn't help (exactly the same behavior as before).

It's not a huge issue, but in terms of time I've blown 1 hour on it.
I have a small SSD for C: drive so that's why this is presenting a problem.

Poor man's workaround:
a) Install Namecoin to the same drive (in my case, I installed it to E:\_blockchain_namecoin).
b) Create a batch file or shortcut as per @cassini
My startup batch file: E:\_blockchain_namecoin\namecoin-qt.exe -datadir=e:\_blockchain_nmc -conf=e:\_blockchain_nmc\namecoin.conf
My namecoin.conf:
walletpath=E:\_blockchain_nmc\wallet.dat
rpcuser=pass
rpcpassword=WORD
rpcport=8336

It seems the fix doesn't properly account for different drive letters (although I have not read the code).

Post Reply