diff options
author | Alexander Blair <snipa@jagtech.io> | 2020-08-27 03:01:28 -0700 |
---|---|---|
committer | Alexander Blair <snipa@jagtech.io> | 2020-08-27 03:01:28 -0700 |
commit | b04da25e4d63e53aaaa260e6aaebf19fb7d7a3dd (patch) | |
tree | 039b0c0a21de62e48f68ec2a71fee3ffd34cbf3e /src | |
parent | Merge pull request #6746 (diff) | |
parent | enforce claiming maximum coinbase amount (diff) | |
download | monero-b04da25e4d63e53aaaa260e6aaebf19fb7d7a3dd.tar.xz |
Merge pull request #6760
844fb4e94 enforce claiming maximum coinbase amount (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_config.h | 1 | ||||
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 8c4e61d4d..8051ee9fa 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -178,6 +178,7 @@ #define HF_VERSION_REJECT_SIGS_IN_COINBASE 12 #define HF_VERSION_ENFORCE_MIN_AGE 12 #define HF_VERSION_EFFECTIVE_SHORT_TERM_MEDIAN_IN_PENALTY 12 +#define HF_VERSION_EXACT_COINBASE 13 #define PER_KB_FEE_QUANTIZATION_DECIMALS 8 diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 853aa065c..20dc7f9fb 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -1397,8 +1397,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) { |