From e9809382109765ce53fcbd95e1fc593d9b19e184 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 1 May 2019 19:57:34 +0000 Subject: fix wide difficulty conversion with some versions of boost --- src/rpc/core_rpc_server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rpc/core_rpc_server.cpp') diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index c41fb37d8..0ad7e59e9 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -74,9 +74,9 @@ namespace void store_difficulty(cryptonote::difficulty_type difficulty, uint64_t &sdiff, std::string &swdiff, uint64_t &stop64) { - sdiff = (difficulty << 64 >> 64).convert_to(); + sdiff = (difficulty & 0xffffffffffffffff).convert_to(); swdiff = cryptonote::hex(difficulty); - stop64 = (difficulty >> 64).convert_to(); + stop64 = ((difficulty >> 64) & 0xffffffffffffffff).convert_to(); } } -- cgit v1.2.3