Merge PR 45: conf: Refuse to start with pooled mining only, if there's no pool set

This commit is contained in:
Luke Dashjr 2025-01-13 03:19:01 +00:00
commit a0d62337c9
No known key found for this signature in database
GPG Key ID: A291A2C45D0C504A

View File

@ -377,6 +377,11 @@ int datum_read_config(const char *conffile) {
return 0; return 0;
} }
if (datum_config.datum_pool_host[0] == '\0' && datum_config.datum_pooled_mining_only == true) {
DLOG_FATAL("Pooled mining only is set to true, but pool host is not specified.");
return 0;
}
// Save some multiplication later // Save some multiplication later
datum_config.datum_protocol_global_timeout_ms = datum_config.datum_protocol_global_timeout * 1000; datum_config.datum_protocol_global_timeout_ms = datum_config.datum_protocol_global_timeout * 1000;