Reader small image

You're reading from  Mastering Blockchain.. - Third Edition

Product typeBook
Published inAug 2020
Reading LevelBeginner
PublisherPackt
ISBN-139781839213199
Edition3rd Edition
Languages
Right arrow
Author (1)
Imran Bashir
Imran Bashir
author image
Imran Bashir

Imran Bashir has an M.Sc. in Information Security from Royal Holloway, University of London, and has a background in software development, solution architecture, infrastructure management, and IT service management. He is also a member of the Institute of Electrical and Electronics Engineers (IEEE) and the British Computer Society (BCS). Imran has extensive experience in both the public and financial sectors, having worked on large-scale IT projects in the public sector before moving to the financial services industry. Since then, he has worked in various technical roles for different financial companies in Europe's financial capital, London.
Read more about Imran Bashir

Right arrow

Mining on the private network

Now that we have started up our private network, mining can start by simply issuing the following command. This command takes one parameter: the number of threads. In the following example, two threads will be allocated to the mining process by specifying 2 as an argument to the start function:

> miner.start()
true

Here we can also provide an integer parameter. For example, if we provide 1, it will only use one CPU core for mining, which helps with performance issues, if using all CPU resources is reducing system performance. An example command of using only one CPU is miner.start(1). On systems where there is only one CPU, issuing the preceding command will inevitably use only one CPU. However, on a multicore system, providing the number of cores that can be used for mining helps to address any performance concerns.

After the preceding command is issued as preparation for mining, the DAG generation process starts, which produces...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Blockchain.. - Third Edition
Published in: Aug 2020Publisher: PacktISBN-13: 9781839213199

Author (1)

author image
Imran Bashir

Imran Bashir has an M.Sc. in Information Security from Royal Holloway, University of London, and has a background in software development, solution architecture, infrastructure management, and IT service management. He is also a member of the Institute of Electrical and Electronics Engineers (IEEE) and the British Computer Society (BCS). Imran has extensive experience in both the public and financial sectors, having worked on large-scale IT projects in the public sector before moving to the financial services industry. Since then, he has worked in various technical roles for different financial companies in Europe's financial capital, London.
Read more about Imran Bashir