enforce claiming maximum coinbase amount

Claiming a slightly lesser amount does not yield the size gains
that were seen pre rct, so this closes a fingerprinting vector
This commit is contained in:
moneromooo-monero 2020-08-14 21:12:11 +00:00
parent 5d850dde99
commit 844fb4e940
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
5 changed files with 33 additions and 2 deletions

View file

@ -1392,8 +1392,8 @@ bool Blockchain::validate_miner_transaction(const block& b, size_t cumulative_bl
MERROR_VER("coinbase transaction spend too much money (" << print_money(money_in_use) << "). Block reward is " << print_money(base_reward + fee) << "(" << print_money(base_reward) << "+" << print_money(fee) << "), cumulative_block_weight " << cumulative_block_weight);
return false;
}
// From hard fork 2, we allow a miner to claim less block reward than is allowed, in case a miner wants less dust
if (version < 2)
// From hard fork 2 till 12, we allow a miner to claim less block reward than is allowed, in case a miner wants less dust
if (version < 2 || version >= HF_VERSION_EXACT_COINBASE)
{
if(base_reward + fee != money_in_use)
{