mirror of
https://git.wownero.com/wownero/wownero-puddle.git
synced 2024-08-15 01:03:20 +00:00
config: disable payouts option
This commit is contained in:
parent
32fa6d2d25
commit
93acdd6e21
2 changed files with 10 additions and 1 deletions
|
@ -20,6 +20,7 @@ log-file =
|
||||||
block-notified = 0
|
block-notified = 0
|
||||||
disable-self-select = 0
|
disable-self-select = 0
|
||||||
disable-hash-check = 0
|
disable-hash-check = 0
|
||||||
|
disable-payouts = 0
|
||||||
data-dir = ./data
|
data-dir = ./data
|
||||||
pid-file =
|
pid-file =
|
||||||
forked = 0
|
forked = 0
|
||||||
|
|
10
src/pool.c
10
src/pool.c
|
@ -157,6 +157,7 @@ typedef struct config_t
|
||||||
bool block_notified;
|
bool block_notified;
|
||||||
bool disable_self_select;
|
bool disable_self_select;
|
||||||
bool disable_hash_check;
|
bool disable_hash_check;
|
||||||
|
bool disable_payouts;
|
||||||
char data_dir[MAX_PATH];
|
char data_dir[MAX_PATH];
|
||||||
char pid_file[MAX_PATH];
|
char pid_file[MAX_PATH];
|
||||||
bool forked;
|
bool forked;
|
||||||
|
@ -2038,7 +2039,7 @@ cleanup:
|
||||||
static int
|
static int
|
||||||
send_payments(void)
|
send_payments(void)
|
||||||
{
|
{
|
||||||
if (*config.upstream_host)
|
if (*config.upstream_host || config.disable_payouts)
|
||||||
return 0;
|
return 0;
|
||||||
uint64_t threshold = 1000000000000 * config.payment_threshold;
|
uint64_t threshold = 1000000000000 * config.payment_threshold;
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -3508,6 +3509,7 @@ read_config(const char *config_file)
|
||||||
config.block_notified = false;
|
config.block_notified = false;
|
||||||
config.disable_self_select = false;
|
config.disable_self_select = false;
|
||||||
config.disable_hash_check = false;
|
config.disable_hash_check = false;
|
||||||
|
config.disable_payouts = false;
|
||||||
strcpy(config.data_dir, "./data");
|
strcpy(config.data_dir, "./data");
|
||||||
|
|
||||||
char path[MAX_PATH] = {0};
|
char path[MAX_PATH] = {0};
|
||||||
|
@ -3648,6 +3650,10 @@ read_config(const char *config_file)
|
||||||
if (config.disable_hash_check)
|
if (config.disable_hash_check)
|
||||||
log_warn("Share hash checking disabled");
|
log_warn("Share hash checking disabled");
|
||||||
}
|
}
|
||||||
|
else if (strcmp(key, "disable-payouts") == 0)
|
||||||
|
{
|
||||||
|
config.disable_payouts = atoi(val);
|
||||||
|
}
|
||||||
else if (strcmp(key, "data-dir") == 0)
|
else if (strcmp(key, "data-dir") == 0)
|
||||||
{
|
{
|
||||||
strncpy(config.data_dir, val, sizeof(config.data_dir)-1);
|
strncpy(config.data_dir, val, sizeof(config.data_dir)-1);
|
||||||
|
@ -3780,6 +3786,7 @@ static void print_config()
|
||||||
" block-notified = %u\n"
|
" block-notified = %u\n"
|
||||||
" disable-self-select = %u\n"
|
" disable-self-select = %u\n"
|
||||||
" disable-hash-check = %u\n"
|
" disable-hash-check = %u\n"
|
||||||
|
" disable-payouts = %u\n"
|
||||||
" data-dir = %s\n"
|
" data-dir = %s\n"
|
||||||
" pid-file = %s\n"
|
" pid-file = %s\n"
|
||||||
" forked = %u\n"
|
" forked = %u\n"
|
||||||
|
@ -3810,6 +3817,7 @@ static void print_config()
|
||||||
config.block_notified,
|
config.block_notified,
|
||||||
config.disable_self_select,
|
config.disable_self_select,
|
||||||
config.disable_hash_check,
|
config.disable_hash_check,
|
||||||
|
config.disable_payouts,
|
||||||
config.data_dir,
|
config.data_dir,
|
||||||
config.pid_file,
|
config.pid_file,
|
||||||
config.forked,
|
config.forked,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue