From cbf3224180380d7ff2b4fc28b3800486f22a1cc7 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 5 Apr 2019 16:28:15 +0000 Subject: rpc: make wide_difficulty hexadecimal This should be friendlier for clients which don't have bignum support --- src/cryptonote_basic/difficulty.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/cryptonote_basic/difficulty.h') diff --git a/src/cryptonote_basic/difficulty.h b/src/cryptonote_basic/difficulty.h index f7a9376fb..02ed89e5a 100644 --- a/src/cryptonote_basic/difficulty.h +++ b/src/cryptonote_basic/difficulty.h @@ -32,6 +32,7 @@ #include #include +#include #include #include "crypto/hash.h" @@ -58,4 +59,6 @@ namespace cryptonote bool check_hash_128(const crypto::hash &hash, difficulty_type difficulty); bool check_hash(const crypto::hash &hash, difficulty_type difficulty); difficulty_type next_difficulty(std::vector timestamps, std::vector cumulative_difficulties, size_t target_seconds); + + std::string hex(difficulty_type v); } -- cgit v1.2.3