-snip-
I understand that this mining is unprofitable and useless on both a computer and a laptop, but is it possible to run mining on Windows for fun?
It's easy with your laptop's CPU:
- Launch your Bitcoin Core node (fully synced)
- Use the command generatetoaddress <number of blocks> <bitcoin address>
The command is designed for "
RegTest" but it'll also work in mainnet, it's just your CPU (
as you know) isn't enough to mine a block.
It will "
mine" with 1000000 iterations by default which is easy to exhaust even with slow CPU.
So, add a third argument, e.g:
generatetoaddress <number of blocks> <bitcoin address> 2147483647 to mine with the maximim possible number of iterations.
There'll be no result if it didn't succeed (
returns the [block hash] if success, otherwise "[]") and there's no visible GUI element while mining;
So it's not "
Fun" IMO, but it's definitely mining in the background if you check your Windows laptop's Task Manager.
Ref:
https://github.com/bitcoin/bitcoin/blob/327f08bb0cd91a22249395adeb34549e3c86ca76/src/rpc/mining.cpp#L255-L294