I am trying to use bitcoin-cli to get data from blockchain. I changed my datadir to another drive, and deleted all files from the default datadir location (in my case %appdata%/Bitcoin). I am running bitcoind with txindex option and with datadir parameter. I created new bitcoin.conf, where I wrote datadir, rpcuser and rpcpassword parameters. Bitcoind runs just fine and it reads the correct config file.
However when I try to run
bitcoin-cli getinfo
I get
What am I doing wrong?
Edit:
Figured that out - I typed wrong path when running bitcoin-cli with the parameter -conf
Now the problem is, that it writes
error message:
Method not found
I am still trying to run
bitcoin-cli getinfo
Edit #2:
Nevermind, just discovered, that getinfo was removed from the RPC API, and that commands are case sensitive, so GetBlock is not found, but getblock works just fine. Thread can be deleted.