Page 1 of 1

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

Posted: Mon Mar 23, 2015 5:00 am
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...

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

Posted: Mon Mar 23, 2015 5:25 pm
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?

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

Posted: Tue Mar 24, 2015 1:07 am
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.

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

Posted: Tue Mar 24, 2015 7:31 am
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).