show more precision for config display at startup
Specifically for pool-fee and payout-threshold display. Also some very minor code tidying.
This commit is contained in:
parent
18524085a0
commit
943f6a0875
|
@ -94,10 +94,9 @@ bstack_drop(bstack_t *q)
|
||||||
{
|
{
|
||||||
if (!q->cc)
|
if (!q->cc)
|
||||||
return;
|
return;
|
||||||
q->n--;
|
|
||||||
size_t idx = q->n % q->c;
|
|
||||||
void *pb = q->b + (idx * q->z);
|
|
||||||
q->cc--;
|
q->cc--;
|
||||||
|
size_t idx = --q->n % q->c;
|
||||||
|
void *pb = q->b + (idx * q->z);
|
||||||
if (q->rf)
|
if (q->rf)
|
||||||
q->rf(pb);
|
q->rf(pb);
|
||||||
}
|
}
|
||||||
|
@ -112,7 +111,8 @@ bstack_top(bstack_t *q)
|
||||||
return pb;
|
return pb;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t bstack_count(bstack_t *q)
|
size_t
|
||||||
|
bstack_count(bstack_t *q)
|
||||||
{
|
{
|
||||||
return q->cc;
|
return q->cc;
|
||||||
}
|
}
|
||||||
|
|
19
src/pool.c
19
src/pool.c
|
@ -1771,7 +1771,7 @@ rpc_on_block_template(const char* data, rpc_callback_t *callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
startup_scan_round_shares()
|
startup_scan_round_shares(void)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
char *err = NULL;
|
char *err = NULL;
|
||||||
|
@ -2269,7 +2269,7 @@ fetch_last_block_header(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
store_last_height_time()
|
store_last_height_time(void)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
char *err = NULL;
|
char *err = NULL;
|
||||||
|
@ -2341,7 +2341,7 @@ trusted_send_balance(client_t *client, const char *address)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
upstream_send_ping()
|
upstream_send_ping(void)
|
||||||
{
|
{
|
||||||
struct evbuffer *output = bufferevent_get_output(upstream_event);
|
struct evbuffer *output = bufferevent_get_output(upstream_event);
|
||||||
char data[9];
|
char data[9];
|
||||||
|
@ -2367,7 +2367,7 @@ upstream_send_account_connect(uint32_t count)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
upstream_send_account_disconnect()
|
upstream_send_account_disconnect(void)
|
||||||
{
|
{
|
||||||
struct evbuffer *output = bufferevent_get_output(upstream_event);
|
struct evbuffer *output = bufferevent_get_output(upstream_event);
|
||||||
char data[9];
|
char data[9];
|
||||||
|
@ -2435,7 +2435,7 @@ upstream_send_client_block(block_t *block)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
upstream_send_backlog()
|
upstream_send_backlog(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Send any unsent shares and blocks upstream.
|
Send any unsent shares and blocks upstream.
|
||||||
|
@ -2716,7 +2716,7 @@ upstream_on_event(struct bufferevent *bev, short error, void *ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
upstream_connect()
|
upstream_connect(void)
|
||||||
{
|
{
|
||||||
struct addrinfo *info = NULL;
|
struct addrinfo *info = NULL;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
@ -4030,7 +4030,8 @@ read_config(const char *config_file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_config()
|
static void
|
||||||
|
print_config(void)
|
||||||
{
|
{
|
||||||
char display_allowed[MAX_HOST*MAX_DOWNSTREAM] = {0};
|
char display_allowed[MAX_HOST*MAX_DOWNSTREAM] = {0};
|
||||||
if (*config.trusted_allowed[0])
|
if (*config.trusted_allowed[0])
|
||||||
|
@ -4063,8 +4064,8 @@ static void print_config()
|
||||||
" pool-fee-wallet = %s\n"
|
" pool-fee-wallet = %s\n"
|
||||||
" pool-start-diff = %"PRIu64"\n"
|
" pool-start-diff = %"PRIu64"\n"
|
||||||
" pool-fixed-diff = %"PRIu64"\n"
|
" pool-fixed-diff = %"PRIu64"\n"
|
||||||
" pool-fee = %.3f\n"
|
" pool-fee = %g\n"
|
||||||
" payment-threshold = %.2f\n"
|
" payment-threshold = %g\n"
|
||||||
" share-mul = %.2f\n"
|
" share-mul = %.2f\n"
|
||||||
" retarget-time = %u\n"
|
" retarget-time = %u\n"
|
||||||
" retarget-ratio = %.2f\n"
|
" retarget-ratio = %.2f\n"
|
||||||
|
|
|
@ -99,8 +99,8 @@ send_json_stats(struct evhttp_request *req, void *arg)
|
||||||
"\"last_template_fetched\":%"PRIu64","
|
"\"last_template_fetched\":%"PRIu64","
|
||||||
"\"last_block_found\":%"PRIu64","
|
"\"last_block_found\":%"PRIu64","
|
||||||
"\"pool_blocks_found\":%d,"
|
"\"pool_blocks_found\":%d,"
|
||||||
"\"payment_threshold\":%.2f,"
|
"\"payment_threshold\":%g,"
|
||||||
"\"pool_fee\":%.3f,"
|
"\"pool_fee\":%g,"
|
||||||
"\"pool_port\":%d,"
|
"\"pool_port\":%d,"
|
||||||
"\"pool_ssl_port\":%d,"
|
"\"pool_ssl_port\":%d,"
|
||||||
"\"allow_self_select\":%u,"
|
"\"allow_self_select\":%u,"
|
||||||
|
|
Loading…
Reference in New Issue