# Gavin Andresen # 2011-03-09 21:36:29 # https://bitcointalk.org/index.php?topic=4328.msg63138#msg63138 Making the fee transaction depend on the block's coinbase would run afoul of this code in CTransaction::ConnectInputs: @p{brk} Code: // If prev is coinbase, check that it's matured @p{brk} if (txPrev.IsCoinBase()) @p{brk} for (CBlockIndex* pindex = pindexBlock; pindex && pindexBlock-@s{gt}nHeight - pindex-@s{gt}nHeight @p{lt} COINBASE_MATURITY; pindex = pindex-@s{gt}pprev) @p{brk} if (pindex-@s{gt}nBlockPos == txindex.pos.nBlockPos && pindex-@s{gt}nFile == txindex.pos.nFile) @p{brk} return error("ConnectInputs() : tried to spend coinbase at depth %d", pindexBlock-@s{gt}nHeight - pindex-@s{gt}nHeight); @p{brk} @p{brk} ... and the entire block would be rejected as invalid. Which is a good thing, otherwise miners could get around the "no spending newly minted coins for COINBASE_MATURITY blocks" rule. @p{brk}