Mining-Reward

比特幣區塊獎勵價值

  • April 14, 2015

有人如何計算比特幣區塊的目前/實時價值?

用於確定這一點的方程/算法是什麼?

我在網上找到了一些資源,但我有點困惑

有人如何計算比特幣區塊的目前/實時價值?

腳步:

  1. 執行bitcoin-cli getblockcount以獲取目前block_height
  2. current_block_reward = 50 / [(block_height MOD 210000) + 1]

用於確定這一點的方程/算法是什麼?

此處定義的比特幣塊的值。預設值為 50 * 100,000,000 Satoshis。

每個“ SubsidyHalvingInterval ”出塊後,每個出塊的獎勵減半。SubsidyHalvingInterval這裡定義

CAmount GetBlockValue(int nHeight, const CAmount& nFees)
{
   CAmount nSubsidy = 50 * COIN;
   int halvings = nHeight / Params().SubsidyHalvingInterval();

   // Force block reward to zero when right shift is undefined.
   if (halvings >= 64)
       return nFees;

   // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
   nSubsidy >>= halvings;

   return nSubsidy + nFees;
}

引用自:https://bitcoin.stackexchange.com/questions/36853