mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
tx_pool: catch theoretical error in get_block_reward
Coverity 196626
This commit is contained in:
parent
09c8111c53
commit
e3779775d7
@ -1268,7 +1268,11 @@ namespace cryptonote
|
|||||||
fee = 0;
|
fee = 0;
|
||||||
|
|
||||||
//baseline empty block
|
//baseline empty block
|
||||||
get_block_reward(median_weight, total_weight, already_generated_coins, best_coinbase, version);
|
if (!get_block_reward(median_weight, total_weight, already_generated_coins, best_coinbase, version))
|
||||||
|
{
|
||||||
|
MERROR("Failed to get block reward for empty block");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
size_t max_total_weight_pre_v5 = (130 * median_weight) / 100 - CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE;
|
size_t max_total_weight_pre_v5 = (130 * median_weight) / 100 - CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE;
|
||||||
|
Loading…
Reference in New Issue
Block a user