Post
Topic
Board Bitcoin Discussion
Merits 2 from 2 users
Re: number of bitcoins
by
pooya87
on 12/03/2020, 05:33:55 UTC
⭐ Merited by mk4 (1) ,mocacinno (1)
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).