mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 19:33:28 +01:00
blockchain: on hardfork 2, allow miners to claim less money than allowed
So they can avoid dust if they so wish
This commit is contained in:
parent
088bc56d79
commit
4bbf944df0
@ -963,10 +963,14 @@ bool Blockchain::validate_miner_transaction(const block& b, size_t cumulative_bl
|
|||||||
LOG_PRINT_L1("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) << ")");
|
LOG_PRINT_L1("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) << ")");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(base_reward + fee != money_in_use)
|
// From hard fork 2, we allow a miner to claim less block reward than is allowed, in case a miner wants less dust
|
||||||
|
if (m_hardfork->get_current_version() < 2)
|
||||||
{
|
{
|
||||||
LOG_PRINT_L1("coinbase transaction doesn't use full amount of block reward: spent: " << money_in_use << ", block reward " << base_reward + fee << "(" << base_reward << "+" << fee << ")");
|
if(base_reward + fee != money_in_use)
|
||||||
return false;
|
{
|
||||||
|
LOG_PRINT_L1("coinbase transaction doesn't use full amount of block reward: spent: " << money_in_use << ", block reward " << base_reward + fee << "(" << base_reward << "+" << fee << ")");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user