remove unusued functions

This commit is contained in:
Jethro Grassie 2019-05-04 13:30:29 -04:00
parent 97f8fa27ae
commit df7e4d5e57
No known key found for this signature in database
GPG key ID: DE8ED755616565BB
4 changed files with 0 additions and 40 deletions

View file

@ -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)
{

View file

@ -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

View file

@ -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<crypto::hash&>(*output), variant, height);
}
bool check_hash(const char* hash, uint64_t difficulty)
{
return check_hash(reinterpret_cast<const crypto::hash&>(hash), difficulty);
}

View file

@ -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
}