org.bitcoinj.core.Block.getBlockInflation()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(141)

本文整理了Java中org.bitcoinj.core.Block.getBlockInflation()方法的一些代码示例,展示了Block.getBlockInflation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.getBlockInflation()方法的具体详情如下:
包路径:org.bitcoinj.core.Block
类名称:Block
方法名:getBlockInflation

Block.getBlockInflation介绍

[英]A utility method that calculates how much new Bitcoin would be created by the block at the given height. The inflation of Bitcoin is predictable and drops roughly every 4 years (210,000 blocks). At the dawn of the system it was 50 coins per block, in late 2012 it went to 25 coins per block, and so on. The size of a coinbase transaction is inflation plus fees.

The half-life is controlled by org.bitcoinj.core.NetworkParameters#getSubsidyDecreaseBlockCount().
[中]一种实用方法,用于计算在给定高度块将创建多少新比特币。比特币的通货膨胀是可以预测的,大约每4年下降一次(210000块)。在这套系统诞生之初,每一块硬币的数量为50枚,到2012年底,每一块硬币的数量达到了25枚,依此类推。coinbase交易的规模是通货膨胀加上费用。
半衰期由组织控制。比特币。果心网络参数#GetSubfidyDecreaseBlockCount()。

代码示例

代码示例来源:origin: greenaddress/GreenBits

if (totalFees.compareTo(params.getMaxMoney()) > 0 || block.getBlockInflation(height).add(totalFees).compareTo(coinbaseValue) < 0)
  throw new VerificationException("Transaction fees out of range");
for (Future<VerificationException> future : listScriptVerificationResults) {

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

if (totalFees.compareTo(params.getMaxMoney()) > 0 || block.getBlockInflation(height).add(totalFees).compareTo(coinbaseValue) < 0)
  throw new VerificationException("Transaction fees out of range");
for (Future<VerificationException> future : listScriptVerificationResults) {

代码示例来源:origin: HashEngineering/dashj

if (totalFees.compareTo(params.getMaxMoney()) > 0 || block.getBlockInflation(height, storedPrev.getHeader().getDifficultyTarget(), false).add(totalFees).compareTo(coinbaseValue) < 0)
  throw new VerificationException("Transaction fees out of range");
for (Future<VerificationException> future : listScriptVerificationResults) {

代码示例来源:origin: fr.acinq/bitcoinj-core

if (totalFees.compareTo(params.getMaxMoney()) > 0 || block.getBlockInflation(height).add(totalFees).compareTo(coinbaseValue) < 0)
  throw new VerificationException("Transaction fees out of range");
for (Future<VerificationException> future : listScriptVerificationResults) {

代码示例来源:origin: fr.acinq/bitcoinj-core

newBlock.getHeader().getBlockInflation(newBlock.getHeight()).add(totalFees).compareTo(coinbaseValue) < 0)
  throw new VerificationException("Transaction fees out of range");
txOutChanges = new TransactionOutputChanges(txOutsCreated, txOutsSpent);

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

newBlock.getHeader().getBlockInflation(newBlock.getHeight()).add(totalFees).compareTo(coinbaseValue) < 0)
  throw new VerificationException("Transaction fees out of range");
txOutChanges = new TransactionOutputChanges(txOutsCreated, txOutsSpent);

代码示例来源:origin: greenaddress/GreenBits

newBlock.getHeader().getBlockInflation(newBlock.getHeight()).add(totalFees).compareTo(coinbaseValue) < 0)
  throw new VerificationException("Transaction fees out of range");
txOutChanges = new TransactionOutputChanges(txOutsCreated, txOutsSpent);

代码示例来源:origin: HashEngineering/dashj

newBlock.getHeader().getBlockInflation(newBlock.getHeight(), storedPrev.getHeader().getDifficultyTarget(), false).add(totalFees).compareTo(coinbaseValue) < 0)
  throw new VerificationException("Transaction fees out of range");
txOutChanges = new TransactionOutputChanges(txOutsCreated, txOutsSpent);

相关文章