rpc: make wide_difficulty hexadecimal

This should be friendlier for clients which don't have bignum support
This commit is contained in:
moneromooo-monero
2019-04-05 16:28:15 +00:00
parent fe3403c8f0
commit cbf3224180
4 changed files with 26 additions and 8 deletions

View File

@@ -74,7 +74,7 @@ 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>();
swdiff = difficulty.convert_to<std::string>();
swdiff = cryptonote::hex(difficulty);
stop64 = (difficulty >> 64).convert_to<uint64_t>();
}
}