How to actually mine genesis block?

How to actually mine genesis block?

How to actually mine genesis block?

At old source, there is [ hashTarget ] and seems loop hash until become below than [ hashTarget ]

But at new source, there is no [ hashTarget ] variable.

What name it changed?

Where is the part actually mine block?

By reference it, maybe I can write code mine genesis block?

And at new source, validation.cpp 986 line, there are code like,

bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos, const Consensus::Params& consensusParams)
.....
....
if(!CheckProofOfWork(block.GetPoWHash(), block.nBits, consensusParams))
...

How this [ CheckProofOfWork ] function can be used? There is no prior variable declaration. There is just [ #include "pow.h" ] Is this enough?

I used this [ CheckProofOfWork ] function same to chainparams.cpp , but error says

undefined reference to `CheckProofOfWork

Why? how to use this function in chainparams.cpp?

http://ift.tt/2EPeThT

Comments

Popular posts from this blog

Bitcoin Core errors with database block

Bitfinex & Market Synergy To Offer Institutional Calibre Cryptocurrency Connectivity