Why does using multichain-cli on the node thats running require datadir?

+2 votes
It seems a little strange that the multichain-cli cannot find the datadir or that it even requires the datadir for that matter.

Surely the node should know its own directory and not rely on cli passing this through?
asked Aug 1, 2017 by MaSsv

1 Answer

0 votes

The multichain-cli tool needs to know the right API credentials to use to communicate with the MultiChain API provided by multichaind. If these are not in the default location, you need to provide the datadir. This is because the multichain-cli tool does not find multichaind via some kind of process scanning (remember it can be used to communicate with remote multichaind processes, and it's possible to have more than one node running on the same blockchain on a single server).

answered Aug 2, 2017 by MultiChain
Its almost a pity in a way. If the API credentials were related to the cli tool and not the datadir - albeit by a config file or params on the call, you wont need to have the datadir.
This would mean you could run cli as a client, without ever connecting the node with multichaind and getting the blockchain, thus making it independent.
It's absolutely possible to run multichain-cli in this way - if you run it without any parameters you can see the help information that shows you how.
OMG. and there it is!! my mistake. thanks
...