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

Need help to recover blpckchain.info wallet, my wife forgot her password and the brute force with btcrecover is not catching the password

When downloading the blockchain my application is become unusable, is there an issue with my code or am I using the BitcoinJ library incorrectly?

Mistakenly sent BTC from my personal wallet back to one of the exchange wallet addresses that I had received BTC from before - help recovering!