From 410b618d18d712db680de8f173a671bb637ff2b0 Mon Sep 17 00:00:00 2001 From: Satoshi Nakamoto Date: Thu, 12 Aug 2010 13:20:57 +0000 Subject: json-spirit print reals with 8 decimal places, bitcoind help instead of bitcoind -? --- json/json_spirit_writer_template.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'json/json_spirit_writer_template.h') diff --git a/json/json_spirit_writer_template.h b/json/json_spirit_writer_template.h index 33bd0ff867..28c49ddc64 100644 --- a/json/json_spirit_writer_template.h +++ b/json/json_spirit_writer_template.h @@ -124,8 +124,11 @@ namespace json_spirit case str_type: output( value.get_str() ); break; case bool_type: output( value.get_bool() ); break; case int_type: output_int( value ); break; - case real_type: os_ << std::showpoint << std::setprecision( 16 ) + + /// Bitcoin: Added std::fixed and changed precision from 16 to 8 + case real_type: os_ << std::showpoint << std::fixed << std::setprecision(8) << value.get_real(); break; + case null_type: os_ << "null"; break; default: assert( false ); } -- cgit v1.2.3