sfm: assert checkup_interval < seed_write_interval
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8b9fbe1e1e
commit
f48927738d
|
@ -112,7 +112,7 @@ auto Fortuna::random_data(unsigned int n_bytes) -> void {
|
|||
|
||||
|
||||
auto Fortuna::seed_file_manager_service() -> void {
|
||||
static constexpr const std::chrono::seconds checkup_interval{10};
|
||||
static constexpr const std::chrono::seconds checkup_interval{7};
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> p_ul(print_mtx);
|
||||
|
@ -127,6 +127,7 @@ auto Fortuna::seed_file_manager_service() -> void {
|
|||
assert(this->_p_accumulator->_p_pools_equal(this->R._p_pools));
|
||||
|
||||
SeedFileManager sfm(this->_p_accumulator);
|
||||
assert(checkup_interval < sfm.get_write_interval());
|
||||
|
||||
a_ul.unlock();
|
||||
mtx_l.unlock();
|
||||
|
|
|
@ -15,8 +15,8 @@ class SeedFileManager {
|
|||
public:
|
||||
struct conf {
|
||||
// std::chrono::minutes write_interval{10};
|
||||
// 10 minutes (as the standard recommends) is a lot, go with 120s
|
||||
const std::chrono::seconds write_interval{120};
|
||||
// 10 minutes (as the standard recommends) is a lot, go with 10s
|
||||
const std::chrono::seconds write_interval{10};
|
||||
std::string seed_f_path{"./.fortuna.seed"};
|
||||
std::size_t seed_f_length{64};
|
||||
|
||||
|
|
Reference in New Issue