Post
Topic
Board Bitcoin Discussion
Re: number of bitcoins
by
Velkro
on 12/03/2020, 23:42:29 UTC
You can check the source code yourself, it's open source.

Code:
static const CAmount MAX_MONEY = 21000000 * COIN;

From: https://github.com/bitcoin/bitcoin/blob/master/src/amount.h

As for changing the number, you'd have to convince everyone that it'd be a good idea to change the number, which I highly highly doubt. I really don't think it's something that you should be worried about.

that's not the place to look, check the comment right above that line.

the fact is that maximum supply as a hard coded number actually doesn't exist anywhere in the code but instead it is mathematically enforced by using the starting supply (in block #0) and halving rules (reward halves every 210000 blocks).
Wow you actually learn something everyday.
I was sure its hard coded limit like stated in first quote.
Now if its mathematically enforced by using the starting supply  and halving rules, its not actual 21M limit but very close to that.