Readercoin mining

Bitcoin 0.15, which Readercoin is based on, doesn't have an internal miner, so we will need to use a dedicated mining tool to mine our blocks. Among many, we will use Cpuminer (minerd), which is pretty simple to use and supports CPU mining for sha256 hashing.

To install it, you can get the binary file from GitHub: https://github.com/pooler/cpuminer/releases. Download the last release and extract the binary, you'll get a file called minerd.

Prior to running cpuminer, we need to generate new addresses in both instances using the following command:

readercoin-cli getnewaddress

Then, run the following command on one or both clients and provide the generated address as a value for the coinbase-addr option:

./minerd -o http://127.0.0.1:9332 ...

Get Blockchain By Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.