From 639be9d7673f0f537871dc87a2cc305d178cc805 Mon Sep 17 00:00:00 2001 From: stoffu Date: Wed, 12 Sep 2018 08:55:40 +0900 Subject: [PATCH] increase precision of printed fee --- src/MempoolStatus.cpp | 2 +- src/page.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MempoolStatus.cpp b/src/MempoolStatus.cpp index 76b5e90..151532d 100644 --- a/src/MempoolStatus.cpp +++ b/src/MempoolStatus.cpp @@ -168,7 +168,7 @@ MempoolStatus::read_mempool() last_tx.mixin_no = sum_data[2]; last_tx.num_nonrct_inputs = sum_data[3]; - last_tx.fee_str = xmreg::xmr_amount_to_str(_tx_info.fee, "{:0.3f}", false); + last_tx.fee_str = xmreg::xmr_amount_to_str(_tx_info.fee, "{:0.4f}", false); last_tx.payed_for_kB_str = fmt::format("{:0.4f}", payed_for_kB); last_tx.xmr_inputs_str = xmreg::xmr_amount_to_str(last_tx.sum_inputs , "{:0.3f}"); last_tx.xmr_outputs_str = xmreg::xmr_amount_to_str(last_tx.sum_outputs, "{:0.3f}"); diff --git a/src/page.h b/src/page.h index 1cd5920..2903b0b 100644 --- a/src/page.h +++ b/src/page.h @@ -256,8 +256,8 @@ struct tx_details mixin_str = std::to_string(mixin_no); fee_str = fmt::format("{:0.6f}", xmr_amount); - fee_short_str = fmt::format("{:0.3f}", xmr_amount); - payed_for_kB_str = fmt::format("{:0.3f}", payed_for_kB); + fee_short_str = fmt::format("{:0.4f}", xmr_amount); + payed_for_kB_str = fmt::format("{:0.4f}", payed_for_kB); } @@ -5542,7 +5542,7 @@ json_emission() string emission_blk_no = std::to_string(current_values.blk_no - 1); string emission_coinbase = xmr_amount_to_str(current_values.coinbase, "{:0.3f}"); - string emission_fee = xmr_amount_to_str(current_values.fee, "{:0.3f}", false); + string emission_fee = xmr_amount_to_str(current_values.fee, "{:0.4f}", false); j_data = json { {"blk_no" , current_values.blk_no - 1},