MultiversX Tracker is Live!

"The Halving" aka "The Bitshift Righting"

Bitcoin Reddit

More / Bitcoin Reddit 76 Views

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

submitted by /u/companionedu
[link] [comments]
Get BONUS $200 for FREE!

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