it is any command line to check the ammout of coins willl be create after build the wallet? it is any command line to check the ammout of coins willl be create after build the wallet?

i just cloned bitcoin and changed the ammount of coins to be 10 million

MAX_MONEY = 10000000


so i would like to know if it is any command to check this value I inserted.

i know i can check
the amount in circulation using the RPC call gettxoutsetinfo
No, there is no way to display the value of this constant. However, I am not sure that this constant is really doing what you want to do, so let me explain its meaning.

The constant MAX_MONEY is the maximum amount that can appear in an individual bitcoin transaction, for instance in tx_verify.cpp in CheckTransaction. Here, actually two checks are done:


The amount in each transaction output is checked against this value
The total across all transaction outputs is checked


So you could theoretically check that your new value is used after a recompile by submitting a transaction violating these constraints and wait for the error message.

However, what you actually want to do (if I read your question correctly) is to increase the total amount of bitcoin that can be mined. This number is not directly hardcoded, but the limit results out of the fact that every 210000 blocks, the subsidy, i.e. the amount of BTC that a miner earns in addition to the transaction fees for mining a block, is halved. This is done in GetBlockSubsidy in validation.cpp, using the parameter nSubsidyHalvingInterval in chainparams.cpp. Thus if you want to change that value (destroying consensus), you would have to make changes at these locations in the source code.