Blockchain By Example
上QQ阅读APP看书,第一时间看更新

Time maturity

The coinbase maturity indicator indicates a time window of 100 blocks between the creating block and the spending block. For Readercoin, we decrease this limit from 100 to 50. In the src/consensus/consensus.h file, we edit the following line of code:

static const int COINBASE_MATURITY = 50;

The reason behind this measure is to make coinbase transactions with less confirmations than the value of the variable COINBASE_MATURITY, unspendable to avoid spending coins generated for orphaned blocks.