banning nodes through bitcoin-cli in Windows

0

I'd like to use Greg Maxwell's banlist for my Bitcoin node in Windows.

When I enter the commands however, I receive the following error message for every bitcoin-cli command:

bitcoin\bin>bitcoin-cli setban ###.###.###.###/32 add 31557600 error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set. See -rpcpassword and -stdinrpcpass. Configuration file: (C:\Users\admin\AppData\Roaming\Bitcoin\bitcoin.conf)

How can I get this to work?

richey

Posted 2019-03-27T13:40:04.083

Reputation: 125

Possible duplicate of bitcoin-cli could not locate RPC credentials

MCCCS 2019-03-27T13:46:12.313

What's in your bitcoin.conf file? Did you change the data directory used by Bitcoin Core either via the -datadir option or in the GUI the first time you started it?Andrew Chow 2019-03-27T14:34:08.853

Actually the command worked now when referring to the correct bitcoin.conf file and data directory as parameters (thank you!) - however, the "setban" parameter throws a "Method not found" error message.richey 2019-03-27T18:22:30.927

1What version of Bitcoin Core are you using?Andrew Chow 2019-03-28T03:30:43.650

version 0.17.0.1richey 2019-03-29T02:46:28.627

No answers