diff --git a/src/util.c b/src/util.c index addb081..8dd6b32 100644 --- a/src/util.c +++ b/src/util.c @@ -84,23 +84,6 @@ bin_to_hex(const char *bin, size_t bin_size, char *hex) } } -void -reverse_hex(char *hex, size_t len) -{ - assert(len % 2 == 0); - size_t start = 0; - size_t end = len-2; - char temp[2]; - while (start < end) - { - memcpy(&temp[0], &hex[start], 2); - memcpy(&hex[start], &hex[end], 2); - memcpy(&hex[end], &temp[0], 2); - start += 2; - end -= 2; - } -} - void reverse_bin(char *bin, size_t len) { diff --git a/src/util.h b/src/util.h index a23d97e..858e52a 100644 --- a/src/util.h +++ b/src/util.h @@ -36,7 +36,6 @@ int is_hex_string(const char *str); void hex_to_bin(const char *hex, char *bin, size_t bin_size); void bin_to_hex(const char *bin, size_t bin_size, char *hex); -void reverse_hex(char *hex, size_t len); void reverse_bin(char *bin, size_t len); #endif diff --git a/src/xmr.cpp b/src/xmr.cpp index 36328f3..8499600 100644 --- a/src/xmr.cpp +++ b/src/xmr.cpp @@ -67,21 +67,6 @@ int get_hashing_blob(const char *input, const size_t in_size, char **output, siz return 0; } -int construct_block_blob(const char *block_data, uint64_t nonce, char **blob) -{ - struct block b = AUTO_VAL_INIT(b); - blobdata bd = block_data; - if (!parse_and_validate_block_from_blob(bd, b)) - return -1; - b.nonce = nonce; - bd = ""; - if (!block_to_blob(b, bd)) - return -2; - *blob = (char*) malloc(bd.size()); - memcpy(*blob, bd.data(), bd.length()); - return 0; -} - int parse_address(const char *input, uint64_t *prefix) { uint64_t tag; @@ -99,8 +84,3 @@ void get_hash(const char *input, const size_t in_size, char **output, int varian crypto::cn_slow_hash(input, in_size, reinterpret_cast(*output), variant, height); } -bool check_hash(const char* hash, uint64_t difficulty) -{ - return check_hash(reinterpret_cast(hash), difficulty); -} - diff --git a/src/xmr.h b/src/xmr.h index 8e1c250..79d04d6 100644 --- a/src/xmr.h +++ b/src/xmr.h @@ -38,10 +38,8 @@ extern "C" { #endif int get_hashing_blob(const char *input, const size_t in_size, char **output, size_t *out_size); -int construct_block_blob(const char *block_data, uint64_t nonce, char **blob); int parse_address(const char *input, uint64_t *prefix); void get_hash(const char *input, const size_t in_size, char **output, int variant, uint64_t height); -bool check_hash(const char* hash, uint64_t difficulty); #ifdef __cplusplus }