With altcoin wallets, mining doesn’t work on a local machine either, I’ve never been able to start a single solo mining on my own machine.
1. Start two nodes. If you want to use GUI, you can run bitcoin-qt in regtest mode. You need one node as a server, your second node can be a client, just choose different folder when starting it.
bitcoin-qt -regtest -rest -rpcuser=username -rpcpassword=password -listen -rpcport=12345 -rpcbind=127.0.0.1:12345 -server
bitcoin-qt -regtest -choosedatadir
2. Open console and connect both nodes:
addnode 127.0.0.1 add
You should see one connection in the bottom right corner.
3. Generate one block to be synchronized with the network:
getnewaddress "" "legacy"
n3SsJoyubRw2udjRFAUExpTrEDNnAbbSsq
dumpprivkey "n3SsJoyubRw2udjRFAUExpTrEDNnAbbSsq"
cNu3gxJLTnyEgqbKea2amjE6g2TYqkcCeqgmPhAQ7LEAHw1MGrw7
generatetoaddress 1 n3SsJoyubRw2udjRFAUExpTrEDNnAbbSsq
4. Run your miner, for example cpuminer by JayDDee and start solo mining:
cpuminer-sse2 --algo sha256d --url=http://127.0.0.1:12345 -u username -p password -D -P --no-getwork --no-longpoll --no-stratum --coinbase-addr=n3SsJoyubRw2udjRFAUExpTrEDNnAbbSsq
It always stops with an error message.
So, what is the content of this error message?