Merge pull request #13 from tpruvot/next

stratum: remove hardcoded ntime range
This commit is contained in:
Ralph 2021-04-14 09:02:45 -04:00 committed by GitHub
commit ab7ee2d0d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -343,8 +343,6 @@ static bool ntime_valid_range(const char ntimehex[])
uint32_t ntime = 0;
if (strlen(ntimehex) != 8) return false;
sscanf(ntimehex, "%8x", &ntime);
if (ntime < 0x5b000000 || ntime > 0x60000000) // 14 Jan 2021
return false;
time(&rawtime);
return (abs(rawtime - ntime) < (30 * 60));
}