aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-05-07 17:36:27 +0200
committerRiccardo Spagni <ric@spagni.net>2019-05-07 17:36:27 +0200
commitf64f59627dddd65a6a99cc057586f6460b5154e1 (patch)
treedf76e8e335fc6bb9ac6948b3f571023553dbcea7 /src/rpc/core_rpc_server.cpp
parentMerge pull request #5508 (diff)
parentfix wide difficulty conversion with some versions of boost (diff)
downloadmonero-f64f59627dddd65a6a99cc057586f6460b5154e1.tar.xz
Merge pull request #5510
e9809382 fix wide difficulty conversion with some versions of boost (moneromooo-monero)
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 468fce9e8..bbcbc2fcd 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -75,9 +75,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>();
}
}