Hello.
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
I get
error: Authorization failed: Incorrect rpcuser or rpcpassword
even though I run bitcoin-cli with parameters -rpcuser and -rpcpassword with the same values that I wrote into the configuration file. I even add the parameter -conf with the path to the configuration file and it still does not help.
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 code: -32601
error message:
Method not found
I am still trying to run
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.