3#include "data/LedgerCacheInterface.hpp"
4#include "etl/SystemState.hpp"
5#include "util/log/Logger.hpp"
17 std::reference_wrapper<SystemState> state_;
18 std::reference_wrapper<data::LedgerCacheInterface> cache_;
30 : state_{std::ref(state)}, cache_{std::ref(cache)}
40 if (not state_.get().isCorruptionDetected) {
41 state_.get().isCorruptionDetected =
true;
45 ) <<
"Disabling the cache to avoid corrupting the DB further. Please investigate.";
46 cache_.get().setDisabled();
Cache for an entire ledger.
Definition LedgerCacheInterface.hpp:21
void onCorruptionDetected()
Notify the operator about a corruption in the DB.
Definition CorruptionDetector.hpp:38
CorruptionDetector(SystemState &state, data::LedgerCacheInterface &cache)
Construct a new Corruption Detector object.
Definition CorruptionDetector.hpp:29
A simple thread-safe logger for the channel specified in the constructor.
Definition Logger.hpp:78
Represents the state of the ETL subsystem.
Definition SystemState.hpp:20