Skip to content

Commit

Permalink
reduce precision of numbers in replay output
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage authored Mar 24, 2019
1 parent a411589 commit 80a9f9f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libraries/chain/db_management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,16 @@ void database::reindex( fc::path data_dir )

if( i % 10000 == 0 )
{
std::stringstream bysize;
std::stringstream bynum;
bysize << std::fixed << std::setprecision(5) << double(std::get<0>(blocks.front())) / total_block_size * 100;
bynum << std::fixed << std::setprecision(5) << double(i*100)/last_block_num;
ilog(
" [by size: ${size}% ${processed} of ${total}] [by num: ${num}% ${i} of ${last}]",
("size", double(std::get<0>(blocks.front())) / total_block_size * 100)
("size", bysize.str())
("processed", std::get<0>(blocks.front()))
("total", total_block_size)
("num", double(i*100)/last_block_num)
("num", bynum.str())
("i", i)
("last", last_block_num)
);
Expand Down

0 comments on commit 80a9f9f

Please sign in to comment.