aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-05-01 19:57:34 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-05-01 19:58:09 +0000
commite9809382109765ce53fcbd95e1fc593d9b19e184 (patch)
treef79bcb4fd4f14e9b262f67c70b4181f6df86b5eb /src/rpc/core_rpc_server.cpp
parentMerge pull request #5486 (diff)
downloadmonero-e9809382109765ce53fcbd95e1fc593d9b19e184.tar.xz
fix wide difficulty conversion with some versions of boost
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp4
1 files changed, 2 insertions, 2 deletions
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<uint64_t>();
+ sdiff = (difficulty & 0xffffffffffffffff).convert_to<uint64_t>();
swdiff = cryptonote::hex(difficulty);
- stop64 = (difficulty >> 64).convert_to<uint64_t>();
+ stop64 = ((difficulty >> 64) & 0xffffffffffffffff).convert_to<uint64_t>();
}
}