How to discover startup flags or command-line options for bitcoind?


I’d like to query the Bitcoin daemon (bitcoind) to find out what startup flags (command-line options) were sent to it on startup (or the current state if it has changed, e.g. -server=0/1 changing).

For example, I may want to know if -addresstype, -disablewallet, -rescan, or -uacomment=<cmt> or some other flag has been set.

Or for Namecoin, it would be very useful to know if -namehistory has been set.

Is there an RPC or any other method to find out?


Or, to ask the question a different way...

src/bitcoind.cpp’s bool AppInit(int argc, char* argv[]) method calls ParseParameters(argc, argv);, which is in src/util.cpp.

In src/util.cpp we have:

map<string, string> mapArgs;static map<string, vector<string> > _mapMultiArgs;const map<string, vector<string> >& mapMultiArgs = _mapMultiArgs;

To store flags/options/args.

I’d basically just like to get whatever is in those variables through bitcoind.


Article source: “https://bitcoin.stackexchange.com/questions/84519/how-to-discover-startup-flags-or-command-line-options-for-bitcoind”

Новости
Теги