mirror of
https://github.com/monero-project/monero.git
synced 2025-08-09 13:42:20 -04:00
Make Blockchain::get_fee_quantization_mask() compile time
This also removes potential thread safety bug in that function.
This commit is contained in:
parent
faedcded39
commit
a25bc71f3f
3 changed files with 31 additions and 14 deletions
|
@ -3628,19 +3628,6 @@ void Blockchain::check_ring_signature(const crypto::hash &tx_prefix_hash, const
|
|||
result = crypto::check_ring_signature(tx_prefix_hash, key_image, p_output_keys, sig.data()) ? 1 : 0;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
uint64_t Blockchain::get_fee_quantization_mask()
|
||||
{
|
||||
static uint64_t mask = 0;
|
||||
if (mask == 0)
|
||||
{
|
||||
mask = 1;
|
||||
for (size_t n = PER_KB_FEE_QUANTIZATION_DECIMALS; n < CRYPTONOTE_DISPLAY_DECIMAL_POINT; ++n)
|
||||
mask *= 10;
|
||||
}
|
||||
return mask;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
uint64_t Blockchain::get_dynamic_base_fee(uint64_t block_reward, size_t median_block_weight, uint8_t version)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue