mirror of
https://git.wownero.com/wownero/wownero-puddle.git
synced 2024-08-15 01:03:20 +00:00
remove unusued functions
This commit is contained in:
parent
97f8fa27ae
commit
df7e4d5e57
4 changed files with 0 additions and 40 deletions
17
src/util.c
17
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
|
void
|
||||||
reverse_bin(char *bin, size_t len)
|
reverse_bin(char *bin, size_t len)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
int is_hex_string(const char *str);
|
int is_hex_string(const char *str);
|
||||||
void hex_to_bin(const char *hex, char *bin, size_t bin_size);
|
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 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);
|
void reverse_bin(char *bin, size_t len);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
20
src/xmr.cpp
20
src/xmr.cpp
|
@ -67,21 +67,6 @@ int get_hashing_blob(const char *input, const size_t in_size, char **output, siz
|
||||||
return 0;
|
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)
|
int parse_address(const char *input, uint64_t *prefix)
|
||||||
{
|
{
|
||||||
uint64_t tag;
|
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);
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,8 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int get_hashing_blob(const char *input, const size_t in_size, char **output, size_t *out_size);
|
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);
|
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);
|
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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue