How to get genesis block value at new bitcoin source

0 votes

I am working bitcoin source 0.15.1

chainparams.cpp script, how to get to know my genesis block value?

Sep 4, 2018 in Blockchain by slayer
• 29,370 points
970 views

1 answer to this question.

0 votes

chainparams.cpp contains a line of code that checks whether the chain’s genesis block is equal to a specified hash.

You can see an example for the line here:

 hashGenesisBlock = genesis.GetHash();
 assert(hashGenesisBlock == uint256("9915158279673d101912be80f25c20627f1dd8bf5231e7c46bfec5ed19737f44"));

To print it the hash of the genesis block, you can use

printf("genesis.GetHash = %s\n", genesis.GetHash().ToString().c_str());

Which prints the genesis block in terminal or debug.log

answered Sep 4, 2018 by digger
• 26,740 points

Related Questions In Blockchain

0 votes
0 answers

How to get AUD price of bitcoin at a particular date

I am trying to find out how ...READ MORE

Mar 1, 2022 in Blockchain by Soham
• 9,710 points
450 views
0 votes
0 answers

How to get Bitcoin value for corresponding USD value in ASP.NET C#?

I want to get the Bitcoin value ...READ MORE

Mar 1, 2022 in Blockchain by Soham
• 9,710 points
816 views
0 votes
1 answer

How to get historic Bitcoin Price Index using coinbase or any other open source API?

I would recommend you to use the ...READ MORE

answered Apr 7, 2022 in Blockchain by Rahul
• 9,680 points
1,350 views
0 votes
1 answer

How to get current block number in parity?

You can get the latest block number ...READ MORE

answered Jun 8, 2018 in Blockchain by Christine
• 15,790 points
1,380 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,434 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,927 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,455 views
0 votes
1 answer

How to get current value of bitcoin?

You can use json_decode to transform it ...READ MORE

answered Aug 20, 2018 in Blockchain by digger
• 26,740 points
813 views
0 votes
1 answer

How to create a Genesis Block in a Private Network?

{     "nonce": "0x0000000000000042",     "difficulty": "0x000000100",     "alloc": {     },     "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",     "coinbase": "0x0000000000000000000000000000000000000000",     "timestamp": "0x00",     "parentHash": ...READ MORE

answered Jul 12, 2018 in Blockchain by digger
• 26,740 points
2,003 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP