Unable to return BlockHashes when I run this generatetoaddress I have downloaded and fully synced with my Mac last Saturday, my Bitcoin Core version is v0.21.0 and my Bitcoin-Qt version 5.9.8.
I did run other RPC commands such as &quot;getrpcinfo&quot; and it did provide result:
{
&quot;active_commands&quot;: [
{
&quot;method&quot;: &quot;getrpcinfo&quot;,
&quot;duration&quot;: 72
}
],
&quot;logpath&quot;: &quot;/Users/jsjs77/Library/Application Support/Bitcoin/debug.log&quot;
}
&quot;getbalance&quot; -
￼
{
&quot;mine&quot;: {
&quot;trusted&quot;: 0.00000000,
&quot;untrusted_pending&quot;: 0.00000000,
&quot;immature&quot;: 0.00000000
}
}
But then, when I want to run this &quot;generatetoaddress nblocks &quot;address&quot; it does not provide block hash result:
￼
generatetoaddress 11  1MDihWw2UfkYyAwrQDWNFbmaH6bx4NBFtL
￼
[
]
I have tried the following methods:
bitcoin-cli generatetoaddress 11  1MDihWw2UfkYyAwrQDWNFbmaH6bx4NBFtL.
￼
Method not found (code -32601)
and
bitcoin-cli -regtest generatetoaddress 11 1MDihWw2UfkYyAwrQDWNFbmaH6bx4NBFtL
￼Method not found (code -32601)
Is this got to do with the changes of latest version? I really need help. Thanks
Open bitcoin.conf and its default location on Mac is $HOME/Library/Application Support/Bitcoin/bitcoin.conf

Save bitcoin.conf with:


regtest=1


Launch Bitcoin Core. You should see a logo color similar to stackexchange:



Open console and run the below commands:

A. getnewaddress
B. generatetoaddress 11 [Address returned in A]