I am looking into CTransaction::CheckTransaction function and doesn't see the check for transaction inputs.
Testing scenario:
1) Malicious node generates and signs the block after MAX_MONEY coins was generated,
2) Malicious node includes new transaction for money generation in that block.
3) Why a correct node will not accept new coins ?
This transaction will be checked with code:
if (IsCoinBase())
{
if (vin[0].scriptSig.size() < 2 || vin[0].scriptSig.size() > 100)
return error("CTransaction::CheckTransaction() : coinbase script size");
}
And this code doesn't check total amount of money
function
bool CBlock::CheckBlock() const
doesn't contain such checks either
Please explain, how the code prevents new coins after MAX_MONEY was generated.
UPD: Found similar topics:
https://bitcointalksearch.org/topic/how-do-clients-enforce-the-50-btc-generation-rule-681https://bitcointalksearch.org/topic/questions-about-inflation-enforcement-2252now I am checking them