(context post by jgarzik)

2 messages BitcoinTalk Jeff Garzik, Satoshi Nakamoto August 11, 2010 — August 11, 2010

Building r127 here, we see some missing casts, apparently:

Code:rpc.cpp: In function �json_spirit::Value gethashespersec(const json_spirit::Array&, bool)�: rpc.cpp:340: error: conversion from �int64� to �json_spirit::Value� is ambiguous json/json_spirit_value.h:283: note: candidates are: json_spirit::Value_impl::Value_impl(double) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits, std::allocator > >] json/json_spirit_value.h:275: note: json_spirit::Value_impl::Value_impl(uint64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits, std::allocator > >] json/json_spirit_value.h:267: note: json_spirit::Value_impl::Value_impl(int64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits, std::allocator > >] json/json_spirit_value.h:259: note: json_spirit::Value_impl::Value_impl(int) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits, std::allocator > >] json/json_spirit_value.h:251: note: json_spirit::Value_impl::Value_impl(bool) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits, std::allocator > >] json/json_spirit_value.h:219: note: json_spirit::Value_impl::Value_impl(typename Config::String_type::const_pointer) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits, std::allocator > >] rpc.cpp:341: error: conversion from �int64� to �json_spirit::Value� is ambiguous json/json_spirit_value.h:283: note: candidates are: json_spirit::Value_impl::Value_impl(double) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits, std::allocator > >] json/json_spirit_value.h:275: note: json_spirit::Value_impl::Value_impl(uint64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits, std::allocator > >] json/json_spirit_value.h:267: note: json_spirit::Value_impl::Value_impl(int64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits, std::allocator > >] json/json_spirit_value.h:259: note: json_spirit::Value_impl::Value_impl(int) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits, std::allocator > >] json/json_spirit_value.h:251: note: json_spirit::Value_impl::Value_impl(bool) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits, std::allocator > >] json/json_spirit_value.h:219: note: json_spirit::Value_impl::Value_impl(typename Config::String_type::const_pointer) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits, std::allocator > >]

The following patch seems to solve the problem: Code:--- a/rpc.cpp +++ b/rpc.cpp @@ -337,8 +337,8 @@ Value gethashespersec(const Array& params, bool fHelp) “Returns a recent hashes per second performance measurement while g

 if (GetTimeMillis() - nHPSTimerStart > 8000)
  •    return (int64)0;
  • return (int64)dHashesPerSec;
  •    return (int64_t)0;
  • return (int64_t)dHashesPerSec; }

Updated SVN.  Thanks.

There’s little hope of not repeatedly stumbling over that in the future.  It doesn’t break the compile for me.