mirror of
https://git.wownero.com/wownero/wownero-puddle.git
synced 2024-08-15 01:03:20 +00:00
reorder functions and fix width
This commit is contained in:
parent
4b2f804354
commit
4a9a883a1a
4 changed files with 923 additions and 901 deletions
1797
src/pool.c
1797
src/pool.c
File diff suppressed because it is too large
Load diff
|
@ -75,7 +75,8 @@ send_json_stats (void *cls, struct MHD_Connection *connection)
|
|||
uint32_t pbf = context->pool_stats->pool_blocks_found;
|
||||
uint64_t mh = 0;
|
||||
double mb = 0.0;
|
||||
const char *wa = MHD_lookup_connection_value(connection, MHD_COOKIE_KIND, "wa");
|
||||
const char *wa = MHD_lookup_connection_value(connection,
|
||||
MHD_COOKIE_KIND, "wa");
|
||||
if (wa != NULL)
|
||||
{
|
||||
mh = miner_hr(wa);
|
||||
|
@ -127,7 +128,8 @@ int
|
|||
start_web_ui(wui_context_t *context)
|
||||
{
|
||||
log_debug("Starting Web UI");
|
||||
mhd_daemon = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY, context->port, NULL, NULL,
|
||||
mhd_daemon = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY,
|
||||
context->port, NULL, NULL,
|
||||
&answer_to_connection, (void*) context, MHD_OPTION_END);
|
||||
return mhd_daemon != NULL ? 0 : -1;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,8 @@
|
|||
|
||||
using namespace cryptonote;
|
||||
|
||||
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)
|
||||
{
|
||||
block b = AUTO_VAL_INIT(b);
|
||||
blobdata bd = std::string(input, in_size);
|
||||
|
@ -79,8 +80,10 @@ int parse_address(const char *input, uint64_t *prefix)
|
|||
return rv ? 0 : -1;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,9 +37,11 @@
|
|||
extern "C" {
|
||||
#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 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);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue