aboutsummaryrefslogtreecommitdiff
path: root/src/serialization/json_object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/serialization/json_object.cpp')
-rw-r--r--src/serialization/json_object.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/serialization/json_object.cpp b/src/serialization/json_object.cpp
index ead3fdd58..a40821d19 100644
--- a/src/serialization/json_object.cpp
+++ b/src/serialization/json_object.cpp
@@ -29,6 +29,7 @@
#include "json_object.h"
#include <limits>
+#include <type_traits>
#include "string_tools.h"
namespace cryptonote
@@ -52,8 +53,9 @@ namespace
void convert_numeric(Source source, Type& i)
{
static_assert(
+ (std::is_same<Type, char>() && std::is_same<Source, int>()) ||
std::numeric_limits<Source>::is_signed == std::numeric_limits<Type>::is_signed,
- "source and destination signs do not match"
+ "comparisons below may have undefined behavior"
);
if (source < std::numeric_limits<Type>::min())
{
@@ -774,6 +776,7 @@ void fromJsonValue(const rapidjson::Value& val, cryptonote::rpc::tx_in_pool& tx)
GET_FROM_JSON_OBJECT(val, tx.receive_time, receive_time);
GET_FROM_JSON_OBJECT(val, tx.last_relayed_time, last_relayed_time);
GET_FROM_JSON_OBJECT(val, tx.relayed, relayed);
+ GET_FROM_JSON_OBJECT(val, tx.do_not_relay, do_not_relay);
}
void toJsonValue(rapidjson::Document& doc, const cryptonote::rpc::hard_fork_info& info, rapidjson::Value& val)