diff options
author | TheCharlatan <seb.kung@gmail.com> | 2023-11-27 11:46:36 +0100 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2024-02-15 14:43:12 +0100 |
commit | 4abde2c4e3fd9b66394b79874583bdc2a9132c36 (patch) | |
tree | b4b0f5e954380d093360d01b591a7b27d2959ecd /src/bitcoin-chainstate.cpp | |
parent | 84f5c135b8118cbe15b8bfb4db80d61237987f64 (diff) | |
download | bitcoin-4abde2c4e3fd9b66394b79874583bdc2a9132c36.tar.xz |
[refactor] Make MainSignals RAII styled
Diffstat (limited to 'src/bitcoin-chainstate.cpp')
-rw-r--r-- | src/bitcoin-chainstate.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/bitcoin-chainstate.cpp b/src/bitcoin-chainstate.cpp index 0514021a8e..f90ae93eca 100644 --- a/src/bitcoin-chainstate.cpp +++ b/src/bitcoin-chainstate.cpp @@ -74,13 +74,11 @@ int main(int argc, char* argv[]) // Start the lightweight task scheduler thread scheduler.m_service_thread = std::thread(util::TraceThread, "scheduler", [&] { scheduler.serviceQueue(); }); - CMainSignals validation_signals{}; + CMainSignals validation_signals{scheduler}; // Gather some entropy once per minute. scheduler.scheduleEvery(RandAddPeriodic, std::chrono::minutes{1}); - validation_signals.RegisterBackgroundSignalScheduler(scheduler); - class KernelNotifications : public kernel::Notifications { public: @@ -303,5 +301,4 @@ epilogue: } } } - validation_signals.UnregisterBackgroundSignalScheduler(); } |