When I run a fresh regtest with an empty datadir and try to getnewaddress, bitcoin-cli fails with
error code: -32601
error message:
Method not found (wallet method is disabled because no wallet is loaded)
This happens with version 40aab35e9828427a800916ac15e3381332f4d0a6 (current master) of bitcoind.
Expected behavior
On bitcoin 0.20.1 it does not happen:
$ rm -rf ~/.bitcoin/regtest
$ bitcoind --version | head -1
Bitcoin Core version v0.20.1
$ bitcoind -regtest -daemon=1
Bitcoin Core starting
$ bitcoin-cli getnewaddress
bcrt1...
$ bitcoin-cli stop
Bitcoin Core stopping
<!--- What behavior did you expect? -->
Actual behavior
$ rm -rf ~/.bitcoin/regtest
$ bitcoind --version | head -1
Bitcoin Core version v0.20.99.0-40aab35e9
$ bitcoind -regtest -daemon=1
Bitcoin Core starting
$ bitcoin-cli getnewaddress
error code: -32601
error message:
Method not found (wallet method is disabled because no wallet is loaded)
$ bitcoin-cli stop
Bitcoin Core stopping
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
To reproduce
100%
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
System information
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
the master version is self-compiled, v0.20.1 is from bitcoincore.org Linux x86_64
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
Ubuntu 20.04 LTS
$ uname -mr
5.4.0-48-generic x86_64