As y'all may know, the block subsidy is cut in half ever 210,00 blocks, and in 2024 we'll have another one!
Though what you may not know is that it is actually a bit shift right operation. Not actually a "divide by".
This is the same thing in computer science, as when you take a binary number and move everything to the right, it halves the number.
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams) { int halvings = nHeight / consensusParams.nSubsidyHalvingInterval; // Force block reward to zero when right shift is undefined. if (halvings >= 64) return 0; CAmount nSubsidy = 50 * COIN; // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years. nSubsidy >>= halvings; return nSubsidy; }
How cool is that! This is why you're taught about bits and bytes in computer science!
Check it out, pretty nifty stuff: src/validation.cpp
I would love some more knowable what else is going on in the validation.cpp file
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments