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<Config>::Value_impl(double) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:275: note: json_spirit::Value_impl<Config>::Value_impl(uint64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:267: note: json_spirit::Value_impl<Config>::Value_impl(int64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:259: note: json_spirit::Value_impl<Config>::Value_impl(int) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:251: note: json_spirit::Value_impl<Config>::Value_impl(bool) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:219: note: json_spirit::Value_impl<Config>::Value_impl(typename Config::String_type::const_pointer) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
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<Config>::Value_impl(double) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:275: note: json_spirit::Value_impl<Config>::Value_impl(uint64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:267: note: json_spirit::Value_impl<Config>::Value_impl(int64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:259: note: json_spirit::Value_impl<Config>::Value_impl(int) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:251: note: json_spirit::Value_impl<Config>::Value_impl(bool) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:219: note: json_spirit::Value_impl<Config>::Value_impl(typename Config::String_type::const_pointer) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >] <near match>
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<Config>::Value_impl(double) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:275: note: json_spirit::Value_impl<Config>::Value_impl(uint64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:267: note: json_spirit::Value_impl<Config>::Value_impl(int64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:259: note: json_spirit::Value_impl<Config>::Value_impl(int) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:251: note: json_spirit::Value_impl<Config>::Value_impl(bool) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:219: note: json_spirit::Value_impl<Config>::Value_impl(typename Config::String_type::const_pointer) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
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<Config>::Value_impl(double) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:275: note: json_spirit::Value_impl<Config>::Value_impl(uint64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:267: note: json_spirit::Value_impl<Config>::Value_impl(int64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:259: note: json_spirit::Value_impl<Config>::Value_impl(int) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:251: note: json_spirit::Value_impl<Config>::Value_impl(bool) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:219: note: json_spirit::Value_impl<Config>::Value_impl(typename Config::String_type::const_pointer) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >] <near match>
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;
}
+++ 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;
}