forked from Ocean/datum_gateway
Check share_stale_seconds is within range 60-150
This commit is contained in:
parent
dafdaa0c55
commit
66e9af2862
@ -362,6 +362,16 @@ int datum_read_config(const char *conffile) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (datum_config.stratum_v1_share_stale_seconds < 60) {
|
||||||
|
DLOG_FATAL("Stratum server stratum.stratum_v1_share_stale_seconds must be at least 60 (suggest 120)");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (datum_config.stratum_v1_share_stale_seconds > 150) {
|
||||||
|
DLOG_FATAL("Stratum server stratum.stratum_v1_share_stale_seconds must not exceed 150 (suggest 120)");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (datum_config.datum_protocol_global_timeout < (datum_config.bitcoind_work_update_seconds+5)) {
|
if (datum_config.datum_protocol_global_timeout < (datum_config.bitcoind_work_update_seconds+5)) {
|
||||||
DLOG_FATAL("DATUM protocol global timeout must be at least the work update interval plus 5 seconds.");
|
DLOG_FATAL("DATUM protocol global timeout must be at least the work update interval plus 5 seconds.");
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user