Title: cloning bitcoin MAX_MONEY not working Post by: chicodosbitcoin on April 01, 2018, 08:08:33 PM I just clonned bitcoin and created a altcoin, the altcoin it is working , but the coin ammount seams not working well.
total of coins I chosed was: 1000 I have changed the amount of coins to be mined, to be 1000 but looks did not work, I have already 8000 coins mined, can someone explain why it is not working? main.h Code: static const int64 MAX_MONEY = 1000 * COIN; //coin limit someone answer this but i kinda did not understand: Code: static const int64 MAX_MONEY = 1000 * COIN; //coin limit Maximum amount (in satoshi) allowed anywhere (in the whole network). COIN is equal to 10^8 This is NOT the total amount of coins which your software is going to produce. ??? ??? ??? ??? ??? I could find litecoin uses: Code: static const int64 MAX_MONEY = 84000000 * COIN; potcoin uses: Code: static const int64 MAX_MONEY = 420000000 * COIN; feathercoin uses: Code: static const CAmount MAX_MONEY = 336000000 * COIN; why when I changed my coin did not work? I found some links on google talking about it but I still not understand well how to fix the coin limit: https://bitcointalk.org/index.php?topic=331069.0 https://bitcoin.stackexchange.com/questions/36612/why-doesnt-changing-max-money-change-the-maximum-number-of-coins how the calculation I need to do? can someone explain me that. thank you. Title: Re: cloning bitcoin MAX_MONEY not working Post by: chicodosbitcoin on April 03, 2018, 12:02:04 AM up
Title: Re: cloning bitcoin MAX_MONEY not working Post by: Velkro on April 03, 2018, 12:49:35 AM up Search the code and look for value of all coins maybe is somewhere else that you did'nt change yet.Maybe you didnt actually use that changes yet, check this two possibilities first. Title: Re: cloning bitcoin MAX_MONEY not working Post by: hushan on April 18, 2018, 08:29:13 AM The MAX_MONEY does not control the money supply, total coins is controlled by the mining process. In bitcoin, you have to change block reward to achieve what you want.
The comment of MAX_MONEY explained it clealy: Code: /** No amount larger than this (in satoshi) is valid. In fact, the total coins is calculated by block reward and halving intervals. Code: in validation.cpp For example, if here you only change nSubsidy from 50 to 100, then max money will be close to 42000000. If you also change consensusParams.nSubsidyHalvingInterval, you will need to take it into calculation too. |