mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
tx_pool: catch theoretical error in get_block_reward
Coverity 196626
This commit is contained in:
parent
09c8111c53
commit
e3779775d7
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue