Bitcoin Forum

Other => Beginners & Help => Topic started by: Reaper301 on March 26, 2016, 04:35:47 AM



Title: Source code understanding
Post by: Reaper301 on March 26, 2016, 04:35:47 AM
Need to know how to find following info in source code
Transaction confirmation time
Block maturity time
Difficulty retarget time
Difficulty algo
Min stake age
Max stake age
Mint8ng maturity
Block reward pow and pos

Now some of the questions are related to altcoin so going to post in that section as well

Any advise / helpful post link would be appreciated


Title: Re: Source code understanding
Post by: achow101 on March 26, 2016, 04:47:49 AM
That stuff is usually in chainparams.cpp or main.cpp. If the coin your are looking at is based off of an older version of bitcoin core e.g. 0.8.6 then it should all be main.cpp.


Title: Re: Source code understanding
Post by: Reaper301 on March 26, 2016, 06:10:33 AM
Thanks for advise sir


Title: Re: Source code understanding
Post by: Reaper301 on March 26, 2016, 06:28:17 AM
Need more baby sitting :)

So what i need to look in main.cpp its whole lot of text   ::)


Title: Re: Source code understanding
Post by: Stouse49 on March 26, 2016, 06:49:48 AM

Transaction confirmation time - TARGET_SPACING or TargetSpacing, GetNextWorkRequired
Block maturity time - coinbase depth
Difficulty retarget time - TARGET_TIMESPAN or TargetTimespan, GetNextWorkRequired
Difficulty algo - GetNextWorkRequired
Min stake age
Max stake age
Minting maturity
Block reward pow and pos - GetBlockValue

Some of these names are based on the older source code, some the newer code.

For POS items, I am not sure.  The best way to learn is to look and read and do "Find Usage" to see what is up with this or that variable in the code.


Title: Re: Source code understanding
Post by: Reaper301 on March 26, 2016, 07:32:49 AM
You guys are great ::respect::