Skip to content
Permalink
Browse files

tx_pool: catch theoretical error in get_block_reward

Coverity 196626
  • Loading branch information
moneromooo-monero committed Feb 12, 2020
1 parent 09c8111 commit e3779775d77a986d90f47708570bc1d6de26d5e7
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/cryptonote_core/tx_pool.cpp
@@ -1268,7 +1268,11 @@ namespace cryptonote
fee = 0;

//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;

0 comments on commit e377977

Please sign in to comment.
You can’t perform that action at this time.